mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 02:15:45 +02:00
chore: transaction simplification (#2347)
chore: simplify transaction multi-locking Also, add the ananlysis routine that determines whether the schewduled transaction is contended with other transaction in a shard thread. Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
parent
ddbdf63470
commit
1fb0a486ac
6 changed files with 87 additions and 131 deletions
|
@ -941,11 +941,6 @@ bool DbSlice::Acquire(IntentLock::Mode mode, const KeyLockArgs& lock_args) {
|
|||
return lock_acquired;
|
||||
}
|
||||
|
||||
void DbSlice::Release(IntentLock::Mode mode, DbIndex db_index, std::string_view key,
|
||||
unsigned count) {
|
||||
return ReleaseNormalized(mode, db_index, KeyLockArgs::GetLockKey(key), count);
|
||||
}
|
||||
|
||||
void DbSlice::ReleaseNormalized(IntentLock::Mode mode, DbIndex db_index, std::string_view key,
|
||||
unsigned count) {
|
||||
DCHECK_EQ(key, KeyLockArgs::GetLockKey(key));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue