File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -1371,6 +1371,10 @@ size_t RdbSaver::Impl::GetTotalBuffersSize() const {
1371
1371
1372
1372
auto cb = [this , &channel_bytes, &serializer_bytes](ShardId sid) {
1373
1373
auto & snapshot = shard_snapshots_[sid];
1374
+ // before create a snapshot we save header so shard_snapshots_ are vector of nullptr until we
1375
+ // start snapshots saving
1376
+ if (!snapshot)
1377
+ return ;
1374
1378
if (channel_.has_value ())
1375
1379
channel_bytes.fetch_add (channel_->GetSize (), memory_order_relaxed);
1376
1380
serializer_bytes.store (snapshot->GetBufferCapacity () + snapshot->GetTempBuffersSize (),
@@ -1393,6 +1397,10 @@ RdbSaver::SnapshotStats RdbSaver::Impl::GetCurrentSnapshotProgress() const {
1393
1397
1394
1398
auto cb = [this , &results](ShardId sid) {
1395
1399
auto & snapshot = shard_snapshots_[sid];
1400
+ // before create a snapshot we save header so shard_snapshots_ are vector of nullptr until we
1401
+ // start snapshots saving
1402
+ if (!snapshot)
1403
+ return ;
1396
1404
results[sid] = snapshot->GetCurrentSnapshotProgress ();
1397
1405
};
1398
1406
You can’t perform that action at this time.
0 commit comments