Skip to content

Commit

Permalink
review fix 2
Browse files Browse the repository at this point in the history
  • Loading branch information
DrDet committed Dec 9, 2023
1 parent b55eb00 commit d4b4515
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions server/confdata-binlog-replay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,21 +168,20 @@ class ConfdataBinlogReplayer : vk::binlog::replayer {

// disable the blacklist because we checked the keys during the previous step
blacklist_enabled_ = false;
int ret_code = 0;
for (int i = 0; i < nrecords; i++) {
if (index_offset[i] >= 0) {
auto res = store_element(reinterpret_cast<const entry_type &>(index_binary_data[index_offset[i]]));
assert(res != OperationStatus::timed_out); // we don't set timeout on snapshot reading
if (current_memory_status() != MemoryStatus::NORMAL) {
ret_code = -1;
raise_confdata_oom_error("Can't read confdata snapshot on start");
break;
}
store_element(reinterpret_cast<const entry_type &>(index_binary_data[index_offset[i]]));
}
}
blacklist_enabled_ = true;
size_hints_.clear();
return ret_code;

if (current_memory_status() != MemoryStatus::NORMAL) {
raise_confdata_oom_error("Can't read confdata snapshot on start");
return -1;
}

return 0;
}

OperationStatus delete_element(const char *key, short key_len) noexcept {
Expand Down

0 comments on commit d4b4515

Please sign in to comment.