Skip to content

Commit

Permalink
add assert
Browse files Browse the repository at this point in the history
  • Loading branch information
ywelsch committed Feb 7, 2019
1 parent 0730ea4 commit a000339
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ protected void doRun() throws Exception {
final long nanosPaused = ccrSettings.getRateLimiter().maybePause(actualChunkSize);
throttleListener.accept(nanosPaused);
final long newOffset = r.getOffset() + actualChunkSize;
assert newOffset <= fileToRecover.length();
final boolean lastChunk = newOffset >= fileToRecover.length();
multiFileWriter.writeFileChunk(fileToRecover.metadata(), r.getOffset(), r.getChunk(),
lastChunk);
Expand Down

0 comments on commit a000339

Please sign in to comment.