mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 18:35:46 +02:00
bug server: fix lns mismatch in replication
Signed-off-by: adi_holden <adi@dragonflydb.io>
This commit is contained in:
parent
c995ffc35a
commit
7402730f71
2 changed files with 3 additions and 1 deletions
|
@ -69,9 +69,10 @@ void JournalStreamer::Start(util::FiberSocketBase* dest, bool send_lsn) {
|
|||
return;
|
||||
}
|
||||
|
||||
DCHECK_GT(item.lsn, last_lsn_writen_);
|
||||
Write(item.data);
|
||||
time_t now = time(nullptr);
|
||||
|
||||
last_lsn_writen_ = item.lsn;
|
||||
// TODO: to chain it to the previous Write call.
|
||||
if (send_lsn && now - last_lsn_time_ > 3) {
|
||||
last_lsn_time_ = now;
|
||||
|
|
|
@ -68,6 +68,7 @@ class JournalStreamer {
|
|||
|
||||
size_t in_flight_bytes_ = 0, total_sent_ = 0;
|
||||
time_t last_lsn_time_ = 0;
|
||||
LSN last_lsn_writen_ = 0;
|
||||
util::fb2::EventCount waker_;
|
||||
uint32_t journal_cb_id_{0};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue