mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-12 02:45:45 +02:00
fix: unblock transactions only if requirements are correct (#2345)
fixes #2294 bug: we unblock XREADGROUP cmd even if we don't have new values fix: added check with custom requirements for blocking comands
This commit is contained in:
parent
03f69ff6c3
commit
5b905452b3
11 changed files with 110 additions and 56 deletions
|
@ -39,7 +39,7 @@ 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(ArgSlice watch_keys, Transaction* me);
|
||||
void AddWatched(ArgSlice watch_keys, KeyReadyChecker krc, Transaction* me);
|
||||
|
||||
// Called from operations that create keys like lpush, rename etc.
|
||||
void AwakeWatched(DbIndex db_index, std::string_view db_key);
|
||||
|
@ -54,7 +54,7 @@ class BlockingController {
|
|||
|
||||
using WatchQueueMap = absl::flat_hash_map<std::string, std::unique_ptr<WatchQueue>>;
|
||||
|
||||
void NotifyWatchQueue(std::string_view key, WatchQueueMap* wqm);
|
||||
void NotifyWatchQueue(std::string_view key, WatchQueueMap* wqm, const DbContext& context);
|
||||
|
||||
// void NotifyConvergence(Transaction* tx);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue