mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-10 09:55:45 +02:00
feat(server): refactor allow preempt on journal record (#4393)
* feat server: refactor allow preempt on journal record Signed-off-by: adi_holden <adi@dragonflydb.io>
This commit is contained in:
parent
7a68528022
commit
a3ef239ac7
15 changed files with 152 additions and 122 deletions
|
@ -1474,15 +1474,15 @@ void Transaction::LogAutoJournalOnShard(EngineShard* shard, RunnableResult resul
|
|||
}
|
||||
// Record to journal autojournal commands, here we allow await which anables writing to sync
|
||||
// the journal change.
|
||||
LogJournalOnShard(shard, std::move(entry_payload), unique_shard_cnt_, true);
|
||||
LogJournalOnShard(shard, std::move(entry_payload), unique_shard_cnt_);
|
||||
}
|
||||
|
||||
void Transaction::LogJournalOnShard(EngineShard* shard, journal::Entry::Payload&& payload,
|
||||
uint32_t shard_cnt, bool allow_await) const {
|
||||
uint32_t shard_cnt) const {
|
||||
auto journal = shard->journal();
|
||||
CHECK(journal);
|
||||
journal->RecordEntry(txid_, journal::Op::COMMAND, db_index_, shard_cnt,
|
||||
unique_slot_checker_.GetUniqueSlotId(), std::move(payload), allow_await);
|
||||
unique_slot_checker_.GetUniqueSlotId(), std::move(payload));
|
||||
}
|
||||
|
||||
void Transaction::ReviveAutoJournal() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue