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

MESOP_CONCURRENT_UPDATES_ENABLED - with non-default state-sessions #980

Open
richard-to opened this issue Sep 21, 2024 · 2 comments
Open
Labels
bug Something isn't working

Comments

@richard-to
Copy link
Collaborator

richard-to commented Sep 21, 2024

Just realized that this could cause some problems with how state session backends currently work. Right now the token IDs change after every request. The old state / token pair also get deleted after every request. After this first concurrent request, the session token will not be found and force a retry.

I was able to verify this behavior using the Memory backend. There was a request retry logged.

@wwwillchen
Copy link
Collaborator

That's a good point, I think we'll need to fix this before making MESOP_CONCURRENT_UPDATES_ENABLED the default, but I imagine this combination will be pretty rare for a while.

@wwwillchen wwwillchen added the bug Something isn't working label Sep 26, 2024
@richard-to
Copy link
Collaborator Author

Yeah, I've been thinking of how to resolve this. I'm thinking what we can do is stop deleting the state session from the cache right away.

We can probably mark it as "accessed" and then perform a deletion of all "accessed" state sessions at a quicker interval than the stale sessions which we currently delete at a 10 minute interval.

Alternatively, we could simplify it further, and just delete all state at a quicker interval. The issue with this is that we may need to balance inactivity time. However, some slight extra latency for inactive sessions may be ok.

I think that could be enough to make the concurrent updates behave the same as with out sessions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants