-
Notifications
You must be signed in to change notification settings - Fork 402
DynamoDB: Make credentials expiry window + jitter configurable #9527
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
DynamoDB: Make credentials expiry window + jitter configurable #9527
Conversation
…iry window from 30 seconds to 60 seconds (in order to avoid retry backoff and expiry times mix)
📚 Documentation preview at https://pr-9527.docs-lakefs-preview.io/ (Updated: 9/21/2025, 1:19:15 PM - Commit: fbbcc50) |
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; just missing unit in the jitter parameter name.
pkg/config/config.go
Outdated
// CredentialsCacheExpiryWindowJitter - The jitter fraction for credentials cache expiry. | ||
// Default is 0.5 (50% jitter). | ||
CredentialsCacheExpiryWindowJitter float64 `mapstructure:"credentials_cache_expiry_window_jitter"` |
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.
Add 'Frac' as suffix. it will be hard to understand the unit is not in duration.
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.
"Fraction", please: "frac" is 4 characters shorter but harder to understand. Or (I prefer) "proportion"; just let's not abbreviate here.
@Jonathan-Rosenberg are these changes relevant considering the investigation you made and the suggestion from AWS to update the dynamodb package? |
@N-o-Z just seen the comment now. Amazing so I'll update it. Anyways, I still think these should be configurable and not constant, but I'll definitly try to update it first. |
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.
Neat, thanks!
But really cool that newer versions actually have the fix you wanted 😎
pkg/config/config.go
Outdated
// CredentialsCacheExpiryWindowJitter - The jitter fraction for credentials cache expiry. | ||
// Default is 0.5 (50% jitter). | ||
CredentialsCacheExpiryWindowJitter float64 `mapstructure:"credentials_cache_expiry_window_jitter"` |
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.
"Fraction", please: "frac" is 4 characters shorter but harder to understand. Or (I prefer) "proportion"; just let's not abbreviate here.
Closes #9428
In addition to making it configurable, change the default expiration window to 60 seconds (instead of 30) to fix the bug mentioned above (read my comment in the issue for more details).
Created an issue in the AWS Go SDK repoThe AWS SDK bug was actually fixed in a later version. I've upgraded the packages to include the fix.