mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 10:25:47 +02:00
fix: fix BLOCKING/REVERSE_MAPPING flags for some commands (#2516)
* fix: BLOCKING/REVERSE_MAPPING flags for some commands Also, simplify interfaces around REVERSE_MAPPING in the internal tx code. --------- Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
parent
5189dae118
commit
b5b5093165
8 changed files with 38 additions and 33 deletions
|
@ -71,13 +71,13 @@ struct KeyIndex {
|
|||
// if index is non-zero then adds another key index (usually 0).
|
||||
// relevant for for commands like ZUNIONSTORE/ZINTERSTORE for destination key.
|
||||
std::optional<uint16_t> bonus{};
|
||||
bool has_reverse_mapping = false;
|
||||
|
||||
static KeyIndex Empty() {
|
||||
return KeyIndex{0, 0, 0, std::nullopt};
|
||||
KeyIndex(unsigned s = 0, unsigned e = 0, unsigned step = 0) : start(s), end(e), step(step) {
|
||||
}
|
||||
|
||||
static KeyIndex Range(unsigned start, unsigned end, unsigned step = 1) {
|
||||
return KeyIndex{start, end, step, std::nullopt};
|
||||
return KeyIndex{start, end, step};
|
||||
}
|
||||
|
||||
bool HasSingleKey() const {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue