Skip to content

Commit d877a6c

Browse files
committed
Fixed bugs in reviewed code
1 parent c97fff0 commit d877a6c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/storage/src/redis.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,7 @@ void Redis::GetBigKeyStatistics(std::vector<BigKeyInfo>* bigkeys) {
208208
if (!bigkeys) {
209209
return;
210210
}
211-
212-
std::lock_guard<std::mutex> lock(big_keys_mutex_);
211+
std::shared_lock lock(big_keys_mutex_);
213212
for (const auto& kv : big_keys_info_map_) {
214213
BigKeyInfo info = kv.second;
215214
info.key = kv.first;

0 commit comments

Comments
 (0)