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: Fix test_network_disconnect_during_migration test #4224

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chakaz
Copy link
Collaborator

@chakaz chakaz commented Nov 28, 2024

There are actually a few failures fixed in this PR, only one of which is a test bug.

Fixes #4207

There are actually a few failures fixed in this PR, only one of which is
a test bug.

Fixes #4207
@kostasrim
Copy link
Contributor

🕺 🚀

Copy link
Contributor

@kostasrim kostasrim left a 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();
Copy link
Contributor

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);
Copy link
Contributor

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)
Copy link
Contributor

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 😄 )

  1. span contains empty()
  2. We can also use NumArgs() and avoid the two calls above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test_network_disconnect_during_migration with big_value_serialization and compression off
2 participants