chore: add -Wthread-analysis and annotate (part 1/2) (#3502)

* enable -Wthread-analysis
* add missing annotations
* small fixes

---------

Signed-off-by: kostas <kostas@dragonflydb.io>
This commit is contained in:
Kostas Kyrimis 2024-08-26 18:22:38 +03:00 committed by GitHub
parent 238bf3ee85
commit 839b1be82d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 163 additions and 147 deletions

View file

@ -507,7 +507,7 @@ class DbSlice {
template <typename Cb, typename DashTable>
PrimeTable::Cursor Traverse(DashTable* pt, PrimeTable::Cursor cursor, Cb&& cb)
ABSL_LOCKS_EXCLUDED(local_mu_) {
std::unique_lock lk(local_mu_);
util::fb2::LockGuard lk(local_mu_);
return pt->Traverse(cursor, std::forward<Cb>(cb));
}