pool: Update token expiration check in cache #234
No reviewers
Labels
No labels
P0
P1
P2
P3
good first issue
pool
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
6 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-sdk-go#234
Loading…
Reference in a new issue
No description provided.
Delete branch "mbiryukova/frostfs-sdk-go:bugfix/token_expiration"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Signed-off-by: Marina Biryukova m.biryukova@yadro.com
7714c7fdf8
to560cbbd1f1
@ -68,3 +69,2 @@
epoch := c.currentEpoch.Load()
// use epoch+1 (clear cache beforehand) to prevent 'expired session token' error right after epoch tick
return val.token.ExpiredAt(epoch + 1)
preExpiredDur := c.tokenDuration / 2
I don't understand. If the lifetime of the session token in the cache is 10 epochs, then why will it be removed from the cache at epoch 95, and not 100?
To avoid errors if epoch increases between sending request to storage and its processing (which can occur now)
cc @alexvanin