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

refactor(storage): remove arc in shared buffer event sender #3518

Merged
merged 2 commits into from
Jun 28, 2022

Conversation

wenym1
Copy link
Contributor

@wenym1 wenym1 commented Jun 28, 2022

I hereby agree to the terms of the Singularity Data, Inc. Contributor License Agreement.

What's changed and what's your intention?

As title. Our current code use an Arc to wrap the shared buffer event sender, which is of type mpsc::UnboundedSender. But it seems that the type support Clone trait and it implements reference counting internally. Therefore, we don't need the Arc any more and we can clone from the raw sender.

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)

Copy link
Collaborator

@hzxa21 hzxa21 left a comment

Choose a reason for hiding this comment

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

I am just about to open a PR for this lol

@codecov
Copy link

codecov bot commented Jun 28, 2022

Codecov Report

Merging #3518 (e4106e0) into main (8203ac7) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #3518      +/-   ##
==========================================
- Coverage   74.46%   74.46%   -0.01%     
==========================================
  Files         769      769              
  Lines      108054   108054              
==========================================
- Hits        80466    80462       -4     
- Misses      27588    27592       +4     
Flag Coverage Δ
rust 74.46% <100.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
src/storage/src/hummock/local_version_manager.rs 79.15% <100.00%> (-0.13%) ⬇️
src/storage/src/hummock/shared_buffer/mod.rs 90.58% <100.00%> (ø)
...e/src/hummock/shared_buffer/shared_buffer_batch.rs 93.35% <100.00%> (ø)
src/meta/src/hummock/mock_hummock_meta_client.rs 40.56% <0.00%> (-0.95%) ⬇️
src/meta/src/manager/id.rs 94.94% <0.00%> (-0.57%) ⬇️
src/meta/src/barrier/mod.rs 81.19% <0.00%> (-0.21%) ⬇️
src/common/src/types/ordered_float.rs 24.70% <0.00%> (-0.20%) ⬇️
src/connector/src/filesystem/file_common.rs 80.80% <0.00%> (+0.44%) ⬆️

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

@wenym1 wenym1 added the mergify/can-merge Indicates that the PR can be added to the merge queue label Jun 28, 2022
@mergify mergify bot merged commit 9ab8ad2 into main Jun 28, 2022
@mergify mergify bot deleted the yiming/no-arc-sender branch June 28, 2022 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mergify/can-merge Indicates that the PR can be added to the merge queue type/refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants