feat(cluster): Cancel blocking commands on cluster update (#2255)

Handle blocking commands during cluster config update

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
This commit is contained in:
Vladislav 2023-12-17 15:32:35 +03:00 committed by GitHub
parent e4da54fdeb
commit aaf01d4244
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 173 additions and 77 deletions

View file

@ -311,6 +311,10 @@ bool ClusterConfig::IsMySlot(SlotId id) const {
return my_slots_.test(id);
}
bool ClusterConfig::IsMySlot(std::string_view key) const {
return IsMySlot(KeySlot(key));
}
ClusterConfig::Node ClusterConfig::GetMasterNodeForSlot(SlotId id) const {
CHECK_LT(id, my_slots_.size()) << "Requesting a non-existing slot id " << id;