feat(server): Implement brpoplpush for single shard case.

A simple case where both src and dest keys are located in the same shard.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
Roman Gershman 2023-01-07 17:06:59 +02:00 committed by Roman Gershman
parent fe2a491824
commit 9ca636e49d
9 changed files with 223 additions and 74 deletions

View file

@ -38,8 +38,8 @@ class BlockingController {
// TODO: consider moving all watched functions to
// EngineShard with separate per db map.
//! AddWatched adds a transaction to the blocking queue.
void AddWatched(Transaction* me);
void RemoveWatched(Transaction* me);
void AddWatched(ArgSlice watch_keys, Transaction* me);
void RemoveWatched(ArgSlice watch_keys, Transaction* me);
// Called from operations that create keys like lpush, rename etc.
void AwakeWatched(DbIndex db_index, std::string_view db_key);