1
0
Fork 0
mirror of https://github.com/dragonflydb/dragonfly.git synced 2024-12-14 11:58:02 +00:00

fix: Lock before accessing slots_ (#1219)

This commit is contained in:
Chaka 2023-05-16 10:58:43 +03:00 committed by GitHub
parent 7ab7d8bb80
commit 790e357aaf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -101,6 +101,7 @@ bool ClusterConfig::IsMySlot(SlotId id) const {
return false;
}
shared_lock gu(mu_);
return slots_[id].owned_by_me;
}