HDFS-16793. Fix failed UT

This commit is contained in:
zengqiang.xu 2022-10-13 14:22:05 +08:00
parent dade7665fe
commit 5f1de83d50
1 changed files with 2 additions and 1 deletions

View File

@ -244,7 +244,8 @@ public class FileJournalManager implements JournalManager {
if (elf.getFirstTxId() >= firstTxId) {
ret.add(new RemoteEditLog(elf.firstTxId, elf.lastTxId,
elf.isInProgress()));
} else if (elf.getFirstTxId() < firstTxId && firstTxId <= elf.getLastTxId()) {
} else if (elf.getFirstTxId() < firstTxId &&
(firstTxId <= elf.getLastTxId() || elf.isInProgress())) {
// If the firstTxId is in the middle of an edit log segment. Return this
// anyway and let the caller figure out whether it wants to use it.
ret.add(new RemoteEditLog(elf.firstTxId, elf.lastTxId,