mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 10:25:47 +02:00
chore: get rid of lock keys (#2894)
* chore: get rid of lock keys 1. Introduce LockTag a type representing the part of the key that is used for locking. 2. Hash keys once in each transaction. 3. Expose swap_memory_bytes metric. --------- Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
parent
9b9c32c91d
commit
2ff7ff9841
12 changed files with 136 additions and 133 deletions
|
@ -69,8 +69,7 @@ struct LockTagOptions {
|
|||
|
||||
struct KeyLockArgs {
|
||||
DbIndex db_index = 0;
|
||||
ArgSlice args;
|
||||
unsigned key_step = 1;
|
||||
absl::Span<const LockFp> fps;
|
||||
};
|
||||
|
||||
// Describes key indices.
|
||||
|
@ -118,7 +117,7 @@ struct OpArgs {
|
|||
}
|
||||
};
|
||||
|
||||
// A strong type for a lock tag. Helps to disambiguide between keys and the parts of the
|
||||
// A strong type for a lock tag. Helps to disambiguate between keys and the parts of the
|
||||
// keys that are used for locking.
|
||||
class LockTag {
|
||||
std::string_view str_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue