mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-10 18:05:44 +02:00
chore: cleanup not used opcodes in replication (#3804)
feat server: cleanup not used opcodes in replication Signed-off-by: adi_holden <adi@dragonflydb.io>
This commit is contained in:
parent
c2da601f6b
commit
fbf12e9abb
5 changed files with 0 additions and 18 deletions
|
@ -205,10 +205,6 @@ io::Result<journal::ParsedEntry> JournalReader::ReadEntry() {
|
|||
|
||||
VLOG(1) << "Read entry " << entry.ToString();
|
||||
|
||||
if (opcode == journal::Op::EXEC) {
|
||||
return entry;
|
||||
}
|
||||
|
||||
auto ec = ReadCommand(&entry.cmd);
|
||||
if (ec)
|
||||
return make_unexpected(ec);
|
||||
|
|
|
@ -59,10 +59,7 @@ void TransactionData::AddEntry(journal::ParsedEntry&& entry) {
|
|||
return;
|
||||
case journal::Op::EXPIRED:
|
||||
case journal::Op::COMMAND:
|
||||
case journal::Op::MULTI_COMMAND:
|
||||
command = std::move(entry.cmd);
|
||||
[[fallthrough]];
|
||||
case journal::Op::EXEC:
|
||||
shard_cnt = entry.shard_cnt;
|
||||
dbid = entry.dbid;
|
||||
txid = entry.txid;
|
||||
|
|
|
@ -19,8 +19,6 @@ enum class Op : uint8_t {
|
|||
SELECT = 6,
|
||||
EXPIRED = 9,
|
||||
COMMAND = 10,
|
||||
MULTI_COMMAND = 11,
|
||||
EXEC = 12,
|
||||
PING = 13,
|
||||
FIN = 14,
|
||||
LSN = 15
|
||||
|
|
|
@ -2358,13 +2358,6 @@ error_code RdbLoaderBase::HandleJournalBlob(Service* service) {
|
|||
SET_OR_RETURN(journal_reader_.ReadEntry(), entry);
|
||||
done++;
|
||||
|
||||
// EXEC entries are just for preserving atomicity of transactions. We don't create
|
||||
// transactions and we don't care about atomicity when we're loading an RDB, so skip them.
|
||||
// Currently rdb_save also filters those records out, but we filter them additionally here
|
||||
// for better forward compatibility if we decide to change that.
|
||||
if (entry.opcode == journal::Op::EXEC)
|
||||
continue;
|
||||
|
||||
if (entry.cmd.cmd_args.empty())
|
||||
return RdbError(errc::rdb_file_corrupted);
|
||||
|
||||
|
|
|
@ -862,8 +862,6 @@ void DflyShardReplica::StableSyncDflyReadFb(Context* cntx) {
|
|||
} else if (tx_data->opcode == journal::Op::PING) {
|
||||
force_ping_ = true;
|
||||
journal_rec_executed_.fetch_add(1, std::memory_order_relaxed);
|
||||
} else if (tx_data->opcode == journal::Op::EXEC) {
|
||||
journal_rec_executed_.fetch_add(1, std::memory_order_relaxed);
|
||||
} else {
|
||||
ExecuteTx(std::move(*tx_data), cntx);
|
||||
journal_rec_executed_.fetch_add(1, std::memory_order_relaxed);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue