-
Notifications
You must be signed in to change notification settings - Fork 14
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
Update session control inside pool #503
Conversation
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
31520d7
to
7a6df92
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.
Usually, I expect some commit body that explains + 1
changes.
Yeah, this needs a real explanation of the mechanics behind it and intended consequences. |
d57690f
to
d7ac14f
Compare
Extended commit message text. Any suggestions are welcome |
Expire session one epoch earlier to avoid situation when token already expired, but still exists in poll's cache. It may happen because epoch changed, but pool not updated yet. This leads to errors "session token not found" or "expired session token". Now, when using ExpiredAt(epoch + 1), the system ensures that at each epoch, it evaluates the upcoming one for token expiration, rather than evaluating the current one. closes #499 Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
d7ac14f
to
2c705b5
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.
LGTM
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.
It may happen because epoch changed, but pool
not updated yet.
How often the Pool
is updated? Can it be less than once an epoch?
Technically can. Practically highly unlikely. |
closes #499