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(remote_wal): some known issues #3052

Merged
merged 4 commits into from
Dec 30, 2023
Merged

fix(remote_wal): some known issues #3052

merged 4 commits into from
Dec 30, 2023

Conversation

niebayes
Copy link
Contributor

@niebayes niebayes commented Dec 29, 2023

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

  • Rewrite the iteration in append_batch to ensure the region_ids and last_entry_ids coincide.
  • Temporarily replace the DashMap with tokio::sync::Mutex to resolve a known deadlock issue.

Checklist

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

Refer to a related PR or issue link (optional)

@github-actions github-actions bot added the docs-not-required This change does not impact docs. label Dec 29, 2023
@niebayes niebayes requested a review from WenyXu December 29, 2023 09:29
@niebayes niebayes enabled auto-merge December 29, 2023 09:29
@niebayes niebayes mentioned this pull request Dec 29, 2023
14 tasks
Copy link
Member

@WenyXu WenyXu left a comment

Choose a reason for hiding this comment

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

Rest LGTM

README.md Outdated Show resolved Hide resolved
src/log-store/src/kafka/client_manager.rs Outdated Show resolved Hide resolved
@WenyXu WenyXu requested review from v0y4g3r and evenyag December 29, 2023 09:39
Copy link

codecov bot commented Dec 29, 2023

Codecov Report

Attention: 28 lines in your changes are missing coverage. Please review.

Comparison is base (7551432) 85.50% compared to head (b2a0802) 85.41%.
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3052      +/-   ##
==========================================
- Coverage   85.50%   85.41%   -0.10%     
==========================================
  Files         794      799       +5     
  Lines      128555   129037     +482     
==========================================
+ Hits       109924   110220     +296     
- Misses      18631    18817     +186     

src/log-store/src/kafka/log_store.rs Outdated Show resolved Hide resolved
src/log-store/src/kafka/log_store.rs Outdated Show resolved Hide resolved
@niebayes niebayes requested review from evenyag and v0y4g3r December 29, 2023 13:19
@niebayes niebayes self-assigned this Dec 29, 2023
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

@niebayes niebayes added this pull request to the merge queue Dec 29, 2023
@killme2008 killme2008 removed this pull request from the merge queue due to a manual request Dec 29, 2023
@niebayes niebayes requested a review from killme2008 December 30, 2023 10:47
@niebayes niebayes added this pull request to the merge queue Dec 30, 2023
Merged via the queue into main with commit 9db1688 Dec 30, 2023
16 checks passed
@niebayes niebayes deleted the fix/known_issues branch December 30, 2023 15:40
Comment on lines +101 to +106
let client_pool = self.client_pool.read().await;
if let Some(client) = client_pool.get(topic) {
return Ok(client.clone());
}
// Manullay releases the read lock.
drop(client_pool);
Copy link
Member

Choose a reason for hiding this comment

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

Adding a scope can avoid releasing the lock manually.

  {
          let client_pool = self.client_pool.read().await;
          if let Some(client) = client_pool.get(topic) {
              return Ok(client.clone());
          }
  }

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.

5 participants