Skip to content

fix(catalog/rest): Using async lock in token to avoid blocking runtime #1223

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

Merged
merged 2 commits into from
Apr 16, 2025

Conversation

Xuanwo
Copy link
Member

@Xuanwo Xuanwo commented Apr 16, 2025

Which issue does this PR close?

We used to think it was acceptable to use a blocking lock in the token since we were not crossing an await boundary. However, our users reported that this can cause the runtime to hang completely if multiple catalog instances try to acquire the token concurrently.

What changes are included in this PR?

This PR fixed it by using an async lock instead.

Are these changes tested?

Unit tests.

@Xuanwo Xuanwo changed the title fix: Using async lock in token to avoid blocking runtime fix(catalog/rest): Using async lock in token to avoid blocking runtime Apr 16, 2025
@Xuanwo Xuanwo requested a review from liurenjie1024 April 16, 2025 12:15
Copy link
Contributor

@liurenjie1024 liurenjie1024 left a comment

Choose a reason for hiding this comment

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

Thanks @Xuanwo for fixing this!

@liurenjie1024 liurenjie1024 merged commit 45345e4 into apache:main Apr 16, 2025
17 checks passed
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.

3 participants