Bug fix, range end was wrong for final range file of backup range task.

This commit is contained in:
Stephen Atherton 2017-11-19 04:44:33 -08:00
parent a31216f3f7
commit 3449bc4cdc
1 changed files with 4 additions and 3 deletions

View File

@ -909,14 +909,15 @@ namespace fileBackup {
// If we've seen a new read version OR hit the end of the stream, then if we were writing a file finish it.
if (values.second != outVersion || done) {
if (outFile){
TEST(true); // Backup range task wrote multiple versions
state Key nextKey = keyAfter(lastKey);
TEST(outVersion != invalidVersion); // Backup range task wrote multiple versions
state Key nextKey = done ? endKey : keyAfter(lastKey);
Void _ = wait(rangeFile.writeKey(nextKey));
bool keepGoing = wait(finishRangeFile(outFile, cx, task, taskBucket, KeyRangeRef(beginKey, nextKey), outVersion));
if(!keepGoing)
return Void();
beginKey = nextKey;
}
if(done)