mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 18:35:46 +02:00
* refactor: create one type for slot ranges #2459
This commit is contained in:
parent
bcae2dfb46
commit
8771ab32a6
14 changed files with 148 additions and 111 deletions
|
@ -702,7 +702,7 @@ void DbSlice::FlushSlotsFb(const SlotSet& slot_ids) {
|
|||
auto del_entry_cb = [&](PrimeTable::iterator it) {
|
||||
std::string_view key = it->first.GetSlice(&tmp);
|
||||
SlotId sid = ClusterConfig::KeySlot(key);
|
||||
if (slot_ids.contains(sid) && it.GetVersion() < next_version) {
|
||||
if (slot_ids.Contains(sid) && it.GetVersion() < next_version) {
|
||||
PerformDeletion(it, db_arr_[0].get());
|
||||
}
|
||||
return true;
|
||||
|
@ -1439,7 +1439,7 @@ void DbSlice::InvalidateDbWatches(DbIndex db_indx) {
|
|||
void DbSlice::InvalidateSlotWatches(const SlotSet& slot_ids) {
|
||||
for (const auto& [key, conn_list] : db_arr_[0]->watched_keys) {
|
||||
SlotId sid = ClusterConfig::KeySlot(key);
|
||||
if (!slot_ids.contains(sid)) {
|
||||
if (!slot_ids.Contains(sid)) {
|
||||
continue;
|
||||
}
|
||||
for (auto conn_ptr : conn_list) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue