Update comments

This commit is contained in:
Antonio Andelic 2024-09-17 10:30:39 +02:00
parent e876997ebb
commit 676b6238d0
2 changed files with 5 additions and 1 deletions

View File

@ -126,8 +126,11 @@ protected:
/// Mutex for snapshots
mutable std::mutex snapshots_lock;
/// Lock for the storage
/// Storage works in thread-safe way ONLY for preprocessing/processing
/// In any other case, unique storage lock needs to be taken
mutable SharedMutex storage_mutex;
/// Lock for storage and responses_queue. It's important to process requests
/// Lock for processing and responses_queue. It's important to process requests
/// and push them to the responses queue while holding this lock. Otherwise
/// we can get strange cases when, for example client send read request with
/// watch and after that receive watch response and only receive response

View File

@ -772,6 +772,7 @@ void KeeperStorage<Container>::UncommittedState::cleanup(int64_t commit_zxid)
template<typename Container>
void KeeperStorage<Container>::UncommittedState::rollback(int64_t rollback_zxid)
{
// we can only rollback the last zxid (if there is any)
std::list<Delta> rollback_deltas;
{
std::lock_guard lock(deltas_mutex);