fix(replication): replication with multi shard sync enabled lagging (#2823)

fix replication: fix replicaiton with multi shard sync enabled

Signed-off-by: adi_holden <adi@dragonflydb.io>
This commit is contained in:
adiholden 2024-04-02 17:53:35 +03:00 committed by GitHub
parent 8937e28bc2
commit 987fbb640e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -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.

View file

@ -853,7 +853,7 @@ void DflyShardReplica::StableSyncDflyReadFb(Context* cntx) {
ExecuteTxWithNoShardSync(std::move(*tx_data), cntx);
}
}
shard_replica_waker_.notify();
shard_replica_waker_.notifyAll();
}
}
@ -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();
}
}