Skip to content

Commit

Permalink
fix(replication): replication with multi shard sync enabled lagging (#…
Browse files Browse the repository at this point in the history
…2823)

fix replication: fix replicaiton with multi shard sync enabled

Signed-off-by: adi_holden <[email protected]>
  • Loading branch information
adiholden authored Apr 2, 2024
1 parent 8937e28 commit 987fbb6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .github/actions/regression-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ runs:
fi
}
# disabled due to failures with this mode.
# (run_pytest_with_args --df enable_multi_shard_sync=true)
(run_pytest_with_args --df enable_multi_shard_sync=true)
(run_pytest_with_args --df enable_multi_shard_sync=false)
- name: Print last log on timeout
Expand Down
1 change: 1 addition & 0 deletions src/server/journal/tx_executor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ std::optional<TransactionData> TransactionReader::NextTxData(JournalReader* read
// When LSN opcode is sent master does not increase journal lsn.
if (lsn_.has_value() && res->opcode != journal::Op::LSN) {
++*lsn_;
VLOG(2) << "read lsn: " << *lsn_;
}

// Check if journal command can be executed right away.
Expand Down
4 changes: 2 additions & 2 deletions src/server/replica.cc
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ void DflyShardReplica::StableSyncDflyReadFb(Context* cntx) {
ExecuteTxWithNoShardSync(std::move(*tx_data), cntx);
}
}
shard_replica_waker_.notify();
shard_replica_waker_.notifyAll();
}
}

Expand Down Expand Up @@ -1007,7 +1007,7 @@ void DflyShardReplica::StableSyncDflyExecFb(Context* cntx) {
auto& data = trans_data_queue_.front();
ExecuteTx(std::move(data.first), data.second, cntx);
trans_data_queue_.pop();
shard_replica_waker_.notify();
shard_replica_waker_.notifyAll();
}
}

Expand Down

0 comments on commit 987fbb6

Please sign in to comment.