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

feat(storage): reduce write lock guard for local_version #3620

Merged
merged 4 commits into from
Jul 4, 2022

Conversation

Li0k
Copy link
Contributor

@Li0k Li0k commented Jul 4, 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 ,but we always need more bench for this case

Checklist

  • [ ] I have written necessary docs and comments
  • [ ] I have added necessary unit tests and integration tests

Refer to a related PR or issue link (optional)

@codecov
Copy link

codecov bot commented Jul 4, 2022

Codecov Report

Merging #3620 (7615df8) into main (030a2f8) will decrease coverage by 0.00%.
The diff coverage is 91.66%.

@@            Coverage Diff             @@
##             main    #3620      +/-   ##
==========================================
- Coverage   74.35%   74.35%   -0.01%     
==========================================
  Files         775      775              
  Lines      110084   110103      +19     
==========================================
+ Hits        81855    81868      +13     
- Misses      28229    28235       +6     
Flag Coverage Δ
rust 74.35% <91.66%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
src/storage/src/monitor/monitored_store.rs 1.72% <0.00%> (-0.03%) ⬇️
src/storage/src/hummock/local_version.rs 94.11% <100.00%> (+0.17%) ⬆️
src/storage/src/hummock/local_version_manager.rs 81.49% <100.00%> (+0.21%) ⬆️
src/storage/src/monitor/state_store_metrics.rs 86.68% <100.00%> (+0.29%) ⬆️
src/meta/src/model/barrier.rs 86.66% <0.00%> (-3.34%) ⬇️
src/meta/src/manager/id.rs 94.94% <0.00%> (-1.13%) ⬇️
src/meta/src/barrier/mod.rs 79.87% <0.00%> (-0.41%) ⬇️
src/frontend/src/expr/utils.rs 98.99% <0.00%> (ø)
... and 1 more

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

@Li0k Li0k requested a review from skyzh July 4, 2022 07:37
Copy link
Contributor

@skyzh skyzh left a comment

Choose a reason for hiding this comment

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

unlock_fair might significantly affect single-thread performance, but I hope it will work anyway 🤣

@Li0k
Copy link
Contributor Author

Li0k commented Jul 4, 2022

unlock_fair might significantly affect single-thread performance, but I hope it will work anyway 🤣

i am not sure it will significantly benefit for this case, so need more bench test, but disucuss with wallace the change of write_lock_guard is expected

@Li0k Li0k added the mergify/can-merge Indicates that the PR can be added to the merge queue label Jul 4, 2022
new_version.set_pinned_version(newly_pinned_version);
{
let mut guard = self.local_version.write();
*guard = new_version;
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure how is the difference between move one large object and move one Arc pointer.

@mergify mergify bot merged commit b60f094 into main Jul 4, 2022
@mergify mergify bot deleted the li0k/feat_local_version_lock branch July 4, 2022 08:32
nasnoisaac pushed a commit to nasnoisaac/risingwave that referenced this pull request Aug 9, 2022
…abs#3620)

* feat(storage): reduce write lock guard for local_version

* feat(metrics): add metrics for iter_in_process_counts to estimate the read ops in the same time

* fix(storage): use rate for metrics iter_in_process_counts

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
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/feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants