-
Notifications
You must be signed in to change notification settings - Fork 66
-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid clearing entire cache on transient errors #564
Comments
Hi @remko , I can see how that would be annoying. Can you use the
Where I think that might give you some segmentation where even if NDB has to nuke all of its own data, it doesn't nuke your other applications' data. |
@chrisrossi How did I not know about this? That indeed sounds like it would solve the most annoying part of my problem, thanks a lot! It's still a fact that Google-managed Redis instances have a scheduled weekly time where they have many failing connections (at least from GAE), so limiting the number of nukes (e.g. only on write errors, as those would potentially leave the cache in an inconsistent state) would be handy (if this would be correct, of course) |
I think the idea is that if there is a known issue with the cache, then it calls into question the validity of the entire contents of the cache. Clearing the whole thing, whether the problem is detected during a read or a write, eliminates any risk of stale data. It's likely that's overkill, but can be hard to guarantee integrity otherwise. We're looking at it now. |
Hi @remko , Although we haven't specifically addressed this issue, we have with the latest release, shipped a fix that adds retry to cache operations, so it may be that you will be less likely to run into this issue now. If you could use the latest version and let us know how it goes for you, that would really helpful. Thank you! |
@chrisrossi Thanks! I will still need to separate our databases, so I will give it a shot once this is done too. |
It seems that google-cloud-ndb now clears the entire global cache (even keys not related to NDB) when any transient error occurs. Since we get transient errors regularly, and since we store other data in our cache, this is problematic for us. I realize a way to avoid this is to use a second Redis instance, but I'd like to avoid this.
Should the entire cache always be cleared on any transient error? I'm guessing limiting it to NDB keys only is too inefficient, but do transient read errors also need to clear a cache? (since I don't think that this can leave the cache in an inconsistent state?)
The text was updated successfully, but these errors were encountered: