-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Improve expiration handling for client-persisted circuit state #64798
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
Conversation
85af042 to
2bb0c30
Compare
Improve expiration handling for client-persisted circuit stateIssueWhen client tries to resume the circuit after the client-held serialized state expires, the operation fails without proper handling. Cause
Solution variantsWhile serializing the state in Even if we do this, we still should explicitly deal with the possibility of expired client-side state when resuming the circuit. Some locations where we can tackle the issue: 1. When trying to resume the circuit in the clientWhen client requests pausing the circuit, we can add expiration information along with the serialized state that we return from the server. When trying to resume, client can cooperatively check whether its persisted state is still valid and simply not pass it to the server if it is expired, or inform the user somehow that this is the case. (We don't care about malicious clients, the resume operation will still fail as it does now.) 2. When recieving the client-side state on the server in
|
2bb0c30 to
601d324
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
maraf
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.
javiercn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
When client tries to resume the circuit after the client-held serialized state expires, the operation fails without proper handling. (See comment for details.)
Description
UpdateRootComponentsearlier toResumeCircuitto allow checking whether the data is valid and not expired. The operation now explicitly fails if the data is not valid (meaning it could not be used later anyway).ResumeCircuitandUpdateRootComponents.Fixes #64607