mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 02:15: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
|
@ -359,6 +359,10 @@ inline uint32_t MemberTimeSeconds(uint64_t now_ms) {
|
|||
return (now_ms / 1000) - kMemberExpiryBase;
|
||||
}
|
||||
|
||||
// Checks whether the touched key is valid for a blocking transaction watching it
|
||||
using KeyReadyChecker =
|
||||
std::function<bool(EngineShard*, const DbContext& context, Transaction* tx, std::string_view)>;
|
||||
|
||||
struct MemoryBytesFlag {
|
||||
uint64_t value = 0;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue