diff --git a/activeio/activeio-core/src/main/java/org/apache/activeio/journal/active/LogFileManager.java b/activeio/activeio-core/src/main/java/org/apache/activeio/journal/active/LogFileManager.java index d224324a88..ec52c16418 100644 --- a/activeio/activeio-core/src/main/java/org/apache/activeio/journal/active/LogFileManager.java +++ b/activeio/activeio-core/src/main/java/org/apache/activeio/journal/active/LogFileManager.java @@ -415,7 +415,7 @@ final public class LogFileManager { // Are we overflowing into next logFile? if (offset >= ri.getLogFileState().getAppendOffset()) { LogFileNode nextActive = ri.getLogFileState().getNextActive(); - if (nextActive == null) { + if (nextActive == null || nextActive.getId() <= ri.getLogFileState().getId() ) { return null; } logFileId = nextActive.getId();