Skip to content

Commit

Permalink
fix: crash during getting info about replication
Browse files Browse the repository at this point in the history
  • Loading branch information
BorysTheDev committed Dec 17, 2024
1 parent 0fe5e86 commit 61a5a3b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/server/rdb_save.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1333,6 +1333,8 @@ size_t RdbSaver::Impl::GetTotalBuffersSize() const {

auto cb = [this, &channel_bytes, &serializer_bytes](ShardId sid) {
auto& snapshot = shard_snapshots_[sid];
if (!snapshot)
return;
if (channel_.has_value())
channel_bytes.fetch_add(channel_->GetSize(), memory_order_relaxed);
serializer_bytes.store(snapshot->GetBufferCapacity() + snapshot->GetTempBuffersSize(),
Expand All @@ -1355,6 +1357,8 @@ RdbSaver::SnapshotStats RdbSaver::Impl::GetCurrentSnapshotProgress() const {

auto cb = [this, &results](ShardId sid) {
auto& snapshot = shard_snapshots_[sid];
if (!snapshot)
return;
results[sid] = snapshot->GetCurrentSnapshotProgress();
};

Expand Down

0 comments on commit 61a5a3b

Please sign in to comment.