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: notifies all workers once a region is flushed #4016

Merged
merged 3 commits into from
May 23, 2024

Conversation

evenyag
Copy link
Contributor

@evenyag evenyag commented May 23, 2024

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

fixes #4012

What's changed and what's your intention?

This PR notifies all workers once a region is flushed to ensure all stalled write requests can proceed. All workers share the same watch channel and they use that channel to notify each other. The worker loop will select both the request receiver and the watch channel receiver.

It also changes the greptime_mito_write_stall_total metric to a gauge vec for all workers.

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR requires documentation updates.

@github-actions github-actions bot added the docs-not-required This change does not impact docs. label May 23, 2024
@evenyag evenyag marked this pull request as ready for review May 23, 2024 06:26
@evenyag evenyag requested review from v0y4g3r and waynexia as code owners May 23, 2024 06:26
Copy link

codecov bot commented May 23, 2024

Codecov Report

Attention: Patch coverage is 96.96970% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 85.16%. Comparing base (9e1af79) to head (800febb).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4016      +/-   ##
==========================================
- Coverage   85.45%   85.16%   -0.30%     
==========================================
  Files         977      980       +3     
  Lines      169519   170140     +621     
==========================================
+ Hits       144868   144896      +28     
- Misses      24651    25244     +593     

src/mito2/src/worker.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@v0y4g3r v0y4g3r left a comment

Choose a reason for hiding this comment

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

LGTM

src/mito2/src/worker.rs Show resolved Hide resolved
@waynexia waynexia added this pull request to the merge queue May 23, 2024
Merged via the queue into GreptimeTeam:main with commit dfc1acb May 23, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-not-required This change does not impact docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Write requests may stall too long when the write buffer is full
3 participants