mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 10:25:47 +02:00
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:
parent
8937e28bc2
commit
987fbb640e
3 changed files with 4 additions and 4 deletions
3
.github/actions/regression-tests/action.yml
vendored
3
.github/actions/regression-tests/action.yml
vendored
|
@ -77,8 +77,7 @@ runs:
|
||||||
fi
|
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)
|
(run_pytest_with_args --df enable_multi_shard_sync=false)
|
||||||
|
|
||||||
- name: Print last log on timeout
|
- name: Print last log on timeout
|
||||||
|
|
|
@ -113,6 +113,7 @@ std::optional<TransactionData> TransactionReader::NextTxData(JournalReader* read
|
||||||
// When LSN opcode is sent master does not increase journal lsn.
|
// When LSN opcode is sent master does not increase journal lsn.
|
||||||
if (lsn_.has_value() && res->opcode != journal::Op::LSN) {
|
if (lsn_.has_value() && res->opcode != journal::Op::LSN) {
|
||||||
++*lsn_;
|
++*lsn_;
|
||||||
|
VLOG(2) << "read lsn: " << *lsn_;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if journal command can be executed right away.
|
// Check if journal command can be executed right away.
|
||||||
|
|
|
@ -853,7 +853,7 @@ void DflyShardReplica::StableSyncDflyReadFb(Context* cntx) {
|
||||||
ExecuteTxWithNoShardSync(std::move(*tx_data), 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();
|
auto& data = trans_data_queue_.front();
|
||||||
ExecuteTx(std::move(data.first), data.second, cntx);
|
ExecuteTx(std::move(data.first), data.second, cntx);
|
||||||
trans_data_queue_.pop();
|
trans_data_queue_.pop();
|
||||||
shard_replica_waker_.notify();
|
shard_replica_waker_.notifyAll();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue