-
Notifications
You must be signed in to change notification settings - Fork 329
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rest LGTM
Codecov ReportAttention:
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 |
fd8c35d
to
521c53f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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); |
There was a problem hiding this comment.
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());
}
}
I hereby agree to the terms of the GreptimeDB CLA
What's changed and what's your intention?
append_batch
to ensure theregion_ids
andlast_entry_ids
coincide.DashMap
withtokio::sync::Mutex
to resolve a known deadlock issue.Checklist
Refer to a related PR or issue link (optional)