mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 02:15:45 +02:00
feat(transaction): Idempotent callbacks (immediate runs) (#2453)
This commit generalizes the machanism of running transaction callbacks during scheduling, removing the need for specialized ScheduleUniqueShard/RunQuickie. Instead, transactions can be run now during ScheduleInShard - called "immediate" runs - if the transaction is concluding and either only a single shard is active or the operation can be safely repeated if scheduling failed (idempotent commands, like MGET). Updates transaction stats to mirror the new changes more closely. --------- Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
This commit is contained in:
parent
84d451fbed
commit
fbc55bb82d
12 changed files with 150 additions and 285 deletions
|
@ -205,13 +205,14 @@ EngineShardSet* shard_set = nullptr;
|
|||
uint64_t TEST_current_time_ms = 0;
|
||||
|
||||
EngineShard::Stats& EngineShard::Stats::operator+=(const EngineShard::Stats& o) {
|
||||
static_assert(sizeof(Stats) == 40);
|
||||
static_assert(sizeof(Stats) == 48);
|
||||
|
||||
defrag_attempt_total += o.defrag_attempt_total;
|
||||
defrag_realloc_total += o.defrag_realloc_total;
|
||||
defrag_task_invocation_total += o.defrag_task_invocation_total;
|
||||
poll_execution_total += o.poll_execution_total;
|
||||
tx_ooo_total += o.tx_ooo_total;
|
||||
tx_immediate_total += o.tx_immediate_total;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue