Skip to content

Commit

Permalink
[#7283] get min offset should return the first available file's offset.
Browse files Browse the repository at this point in the history
  • Loading branch information
yuz10 authored Aug 30, 2023
1 parent 26fde6b commit 52746f7
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,12 @@ public long getMinOffset() {
if (!mappedFileQueue.getMappedFiles().isEmpty()) {
return mappedFileQueue.getMinOffset();
}
return dLedgerFileList.getMinOffset();
for (MmapFile file : dLedgerFileList.getMappedFiles()) {
if (file.isAvailable()) {
return file.getFileFromOffset() + file.getStartPosition();
}
}
return 0;
}

@Override
Expand Down

0 comments on commit 52746f7

Please sign in to comment.