mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 10:25:47 +02:00
bug(server): do not write lsn opcode to journal (#2814)
Signed-off-by: adi_holden <adi@dragonflydb.io>
This commit is contained in:
parent
a93ad4e86f
commit
bb242a7894
10 changed files with 26 additions and 18 deletions
|
@ -63,7 +63,8 @@ void JournalWriter::Write(std::monostate) {
|
|||
|
||||
void JournalWriter::Write(const journal::Entry& entry) {
|
||||
// Check if entry has a new db index and we need to emit a SELECT entry.
|
||||
if (entry.opcode != journal::Op::SELECT && (!cur_dbid_ || entry.dbid != *cur_dbid_)) {
|
||||
if (entry.opcode != journal::Op::SELECT && entry.opcode != journal::Op::LSN &&
|
||||
entry.opcode != journal::Op::PING && (!cur_dbid_ || entry.dbid != *cur_dbid_)) {
|
||||
Write(journal::Entry{journal::Op::SELECT, entry.dbid, entry.slot});
|
||||
cur_dbid_ = entry.dbid;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue