Skip to content

Switch TokenCache to RWLock#648

Merged
crepererum merged 2 commits into
apache:mainfrom
tustvold:use-rwlock-token-cache
Mar 2, 2026
Merged

Switch TokenCache to RWLock#648
crepererum merged 2 commits into
apache:mainfrom
tustvold:use-rwlock-token-cache

Conversation

@tustvold

@tustvold tustvold commented Feb 21, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

Comment thread src/client/token.rs
}

impl<T: Clone + Send> TokenCache<T> {
impl<T: Clone + Send + Sync> TokenCache<T> {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is necessary to make get_or_insert_with Send, which otherwise makes clippy sad

@alamb alamb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ankrgyl

ankrgyl commented Mar 1, 2026

Copy link
Copy Markdown

nice!!

@crepererum crepererum merged commit 66e640d into apache:main Mar 2, 2026
9 checks passed
@alamb

alamb commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Heavy contention on credentials cache

4 participants