Skip to content
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

fix: remove unsafe impl Sync trait for LruCacheShard #2996

Merged
merged 2 commits into from
Jun 6, 2022

Conversation

MrCroxx
Copy link
Contributor

@MrCroxx MrCroxx commented Jun 6, 2022

What's changed and what's your intention?

LruCacheShard only need to be Send for the async environment. It's not thread-safe and is protected by Mutex in LruCache.

Checklist

  • I have written necessary docs and comments
  • I have added necessary unit tests and integration tests
  • All checks passed in ./risedev check (or alias, ./risedev c)

Refer to a related PR or issue link (optional)

@MrCroxx MrCroxx self-assigned this Jun 6, 2022
@github-actions github-actions bot added the type/fix Bug fix label Jun 6, 2022
@codecov
Copy link

codecov bot commented Jun 6, 2022

Codecov Report

Merging #2996 (438feb0) into main (d7e6420) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #2996      +/-   ##
==========================================
- Coverage   72.98%   72.98%   -0.01%     
==========================================
  Files         723      723              
  Lines       96957    96957              
==========================================
- Hits        70766    70765       -1     
- Misses      26191    26192       +1     
Flag Coverage Δ
rust 72.98% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/common/src/cache.rs 96.61% <ø> (ø)
src/meta/src/barrier/mod.rs 65.27% <0.00%> (-0.33%) ⬇️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

Copy link
Contributor

@wenym1 wenym1 left a comment

Choose a reason for hiding this comment

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

LGTM

@MrCroxx MrCroxx merged commit 71f5206 into main Jun 6, 2022
@MrCroxx MrCroxx deleted the xx/remove-lru-cache-shard-sync-trait branch June 6, 2022 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/fix Bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants