chore: LockTable tracks fingerprints of keys (#2839)

* chore: LockTable tracks fingerprints of keys

It's a first step that will probably simplify dependencies in many places
where we need to keep key strings for that. A second step will be to reduce the CPU load
of multi-key operations like MSET and precompute Fingerprints once.

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
Roman Gershman 2024-04-10 17:52:53 +03:00 committed by GitHub
parent 56a7f85e39
commit da5c51d1dd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 59 additions and 57 deletions

View file

@ -758,7 +758,7 @@ auto EngineShard::AnalyzeTxQueue() const -> TxQueueInfo {
info.contended_locks++;
if (lock.ContentionScore() > info.max_contention_score) {
info.max_contention_score = lock.ContentionScore();
info.max_contention_lock_name = key.view();
info.max_contention_lock = key;
}
}
}