-
Notifications
You must be signed in to change notification settings - Fork 959
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: Fix test_network_disconnect_during_migration
test
#4224
base: main
Are you sure you want to change the base?
Conversation
There are actually a few failures fixed in this PR, only one of which is a test bug. Fixes #4207
🕺 🚀 |
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
@@ -79,7 +81,9 @@ void JournalStreamer::Cancel() { | |||
VLOG(1) << "JournalStreamer::Cancel"; | |||
waker_.notifyAll(); | |||
journal_->UnregisterOnChange(journal_cb_id_); | |||
WaitForInflightToComplete(); | |||
if (!cntx_->IsCancelled()) { | |||
WaitForInflightToComplete(); |
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.
I was about to write that maybe we should move cntx_->IsCancelled()
within WaitForInFlightToComplete
but then I realized it's only called in this place so not really needed I guess
@@ -41,7 +41,9 @@ JournalStreamer::JournalStreamer(journal::Journal* journal, Context* cntx) | |||
} | |||
|
|||
JournalStreamer::~JournalStreamer() { | |||
DCHECK_EQ(in_flight_bytes_, 0u); | |||
if (!cntx_->IsCancelled()) { | |||
DCHECK_EQ(in_flight_bytes_, 0u); |
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.
How did we not trigger this before ? Or did we just deadlocked because WaitForInFlightToCOmplete() would never progress
?
@@ -112,6 +112,8 @@ MultiCommandSquasher::SquashResult MultiCommandSquasher::TrySquash(StoredCmd* cm | |||
|
|||
cmd->Fill(&tmp_keylist_); | |||
auto args = absl::MakeSpan(tmp_keylist_); | |||
if (args.size() == 0) |
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.
Curious, didn't DetermineKeys
below handle this case or ?
Also general small nits (I do not care if you apply this or not 😄 )
span
containsempty()
- We can also use
NumArgs()
and avoid the two calls above.
There are actually a few failures fixed in this PR, only one of which is a test bug.
Fixes #4207