chore: enable -Werror=thread-safety and add missing annotations (part 2/2) (#3595)

* add missing annotations
* small mutex fixes
* enable -Werror=thread-safety for clang builds

---------

Signed-off-by: kostas <kostas@dragonflydb.io>
This commit is contained in:
Kostas Kyrimis 2024-08-30 15:42:30 +03:00 committed by GitHub
parent 0705bbb536
commit 41f7b611d0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 127 additions and 82 deletions

View file

@ -565,8 +565,7 @@ class DbSlice {
return version_++;
}
void CallChangeCallbacks(DbIndex id, std::string_view key, const ChangeReq& cr) const
ABSL_EXCLUSIVE_LOCKS_REQUIRED(local_mu_);
void CallChangeCallbacks(DbIndex id, std::string_view key, const ChangeReq& cr) const;
// Used to provide exclusive access while Traversing segments
mutable ThreadLocalMutex local_mu_;