mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-21 14:02:59 +08:00
Fixes for range streaming BG snapshot
This commit is contained in:
parent
aa252582c8
commit
e0578f24d2
@ -45,11 +45,6 @@
|
|||||||
|
|
||||||
#define BM_DEBUG true
|
#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
|
// TODO add comments + documentation
|
||||||
void handleClientBlobRange(KeyRangeMap<bool>* knownBlobRanges,
|
void handleClientBlobRange(KeyRangeMap<bool>* knownBlobRanges,
|
||||||
Arena& ar,
|
Arena& ar,
|
||||||
|
@ -701,8 +701,7 @@ ACTOR Future<BlobFileIndex> dumpInitialSnapshotFromFDB(Reference<BlobWorkerData>
|
|||||||
true);
|
true);
|
||||||
Future<Void> streamFuture =
|
Future<Void> streamFuture =
|
||||||
tr->getTransaction().getRangeStream(rowsStream, metadata->keyRange, GetRangeLimits(), Snapshot::True);
|
tr->getTransaction().getRangeStream(rowsStream, metadata->keyRange, GetRangeLimits(), Snapshot::True);
|
||||||
wait(streamFuture);
|
wait(streamFuture && success(snapshotWriter));
|
||||||
state BlobFileIndex f = wait(snapshotWriter);
|
|
||||||
TraceEvent("BlobGranuleSnapshotFile", bwData->id)
|
TraceEvent("BlobGranuleSnapshotFile", bwData->id)
|
||||||
.detail("Granule", metadata->keyRange)
|
.detail("Granule", metadata->keyRange)
|
||||||
.detail("Version", readVersion);
|
.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
|
// initial snapshot is committed in fdb, we can pop the change feed up to this version
|
||||||
bwData->addActor.send(bwData->db->popChangeFeedMutations(cfKey, readVersion));
|
bwData->addActor.send(bwData->db->popChangeFeedMutations(cfKey, readVersion));
|
||||||
return f;
|
return snapshotWriter.get();
|
||||||
} catch (Error& e) {
|
} catch (Error& e) {
|
||||||
if (e.code() == error_code_operation_cancelled) {
|
if (e.code() == error_code_operation_cancelled) {
|
||||||
throw e;
|
throw e;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user