Fixes for range streaming BG snapshot

This commit is contained in:
Josh Slocum 2022-03-01 12:45:49 -06:00
parent aa252582c8
commit e0578f24d2
2 changed files with 2 additions and 8 deletions

View File

@ -45,11 +45,6 @@
#define BM_DEBUG true
// DO NOT CHANGE THIS
// Special key where the value means the epoch + sequence number of the split, instead of the actual boundary
// Chosen because this should not be a start or end key in any split
static Key splitBoundarySpecialKey = "\xff\xff\xff"_sr;
// TODO add comments + documentation
void handleClientBlobRange(KeyRangeMap<bool>* knownBlobRanges,
Arena& ar,

View File

@ -701,8 +701,7 @@ ACTOR Future<BlobFileIndex> dumpInitialSnapshotFromFDB(Reference<BlobWorkerData>
true);
Future<Void> streamFuture =
tr->getTransaction().getRangeStream(rowsStream, metadata->keyRange, GetRangeLimits(), Snapshot::True);
wait(streamFuture);
state BlobFileIndex f = wait(snapshotWriter);
wait(streamFuture && success(snapshotWriter));
TraceEvent("BlobGranuleSnapshotFile", bwData->id)
.detail("Granule", metadata->keyRange)
.detail("Version", readVersion);
@ -710,7 +709,7 @@ ACTOR Future<BlobFileIndex> dumpInitialSnapshotFromFDB(Reference<BlobWorkerData>
// initial snapshot is committed in fdb, we can pop the change feed up to this version
bwData->addActor.send(bwData->db->popChangeFeedMutations(cfKey, readVersion));
return f;
return snapshotWriter.get();
} catch (Error& e) {
if (e.code() == error_code_operation_cancelled) {
throw e;