Skip to content
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

More reliable cache operations #732

Closed
JunTaoLuo opened this issue May 20, 2016 · 8 comments
Closed

More reliable cache operations #732

JunTaoLuo opened this issue May 20, 2016 · 8 comments
Milestone

Comments

@JunTaoLuo
Copy link

As part of discussions while working on aspnet/Session#99, there were proposals for adding logic in caching to make database operations more reliable. For example, sql database operations may fail intermittently. In this case it may be a good idea to add retry logic and allow users to specify retry policies. This probably needs some more design work.

cc @mikeharder @Tratcher @davidfowl

@sebastienros
Copy link
Member

SqlConnection already has this logic internally.
And I think it should be handled by the user, it would not just happen in the cache if it was an issue.

@Tratcher
Copy link
Member

When the failures are very provider specific I think there are some things that should be mitigated by the cache wrapper for those providers. E.g. Session is a major consumer of distributed cache and it can't know what different sql errors are retry able. Or Redis errors for that matter.

That said we have changed Session to suppress most errors, disable session for that individual request, and try again for the next request.

@Tratcher
Copy link
Member

If SqlConnection has built in support for some of these scenarios, great. So long as it can be configured for the cache.

@muratg muratg assigned natemcmaster and unassigned pakrym Sep 23, 2016
@muratg
Copy link

muratg commented Sep 23, 2016

We'll need to fail silently instead of throwing exceptions.

@natemcmaster
Copy link

Per discussion with the team, we decided not to implement retry logic/policies. We may add this in the future if we get more feedback that users want API for this.

For now we will harden Redis and SqlServer cache implementations to silently fail on all operations, and add logging when an expression is suppressed (#238).

@natemcmaster
Copy link

We discussed more and will be reverting #238. Suppressing errors isn't a sensible default for some caching scenarios, so we'll need introduce API changes. For now, users who want more reliable operations should wrap cache operations in try/catch.

@natemcmaster natemcmaster reopened this Oct 13, 2016
@muratg
Copy link

muratg commented Oct 13, 2016

We'll revisit the design for 2.0.0.

@natemcmaster natemcmaster removed their assignment Oct 13, 2016
@aspnet-hello aspnet-hello transferred this issue from aspnet/Caching Dec 13, 2018
@aspnet-hello aspnet-hello added this to the Backlog milestone Dec 13, 2018
@analogrelay
Copy link

Seems like this hasn't gotten traction. Closing as it's not likely to be prioritized moving forward.

@ghost ghost locked as resolved and limited conversation to collaborators Apr 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants