feat(server): Implement MOVE command (#298)

* feat(server): Implement MOVE command

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
Co-authored-by: Vladislav Oleshko <vlad@dragonflydb.io>
This commit is contained in:
Vladislav 2022-09-18 20:57:12 +03:00 committed by GitHub
parent 1aef3c1030
commit 16b6b11cf2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 148 additions and 23 deletions

View file

@ -398,13 +398,14 @@ bool Transaction::RunInShard(EngineShard* shard) {
}
}
sd.local_mask &= ~OUT_OF_ORDER;
// It has 2 responsibilities.
// 1: to go over potential wakened keys, verify them and activate watch queues.
// 2: if this transaction was notified and finished running - to remove it from the head
// of the queue and notify the next one.
if (shard->blocking_controller())
shard->blocking_controller()->RunStep(awaked_prerun ? this : nullptr);
}
// It has 2 responsibilities.
// 1: to go over potential wakened keys, verify them and activate watch queues.
// 2: if this transaction was notified and finished running - to remove it from the head
// of the queue and notify the next one.
// RunStep is also called for global transactions because of commands like MOVE.
if (shard->blocking_controller()) {
shard->blocking_controller()->RunStep(awaked_prerun ? this : nullptr);
}
}