Skip to content

Commit

Permalink
Merge pull request qunarcorp#20 from Dennis8274/fix_delay_message_rep…
Browse files Browse the repository at this point in the history
…layer

fix delay message replayer
  • Loading branch information
yuyijq authored Dec 27, 2018
2 parents 92c4015 + 2c41192 commit 7cd5dde
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ private void processLog(long cursor) {
if (LOG_LIMITER.tryAcquire()) {
LOGGER.info("replay message log failed,cursor < iterate,cursor:{},iterate:{}", cursor, iterate);
}
if ((iterate % PER_SEGMENT_FILE_SIZE) != 0) throw new RuntimeException("MessageReplayLessThanEx");
this.cursor.set(iterate);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ private Optional<LogRecord> readOneRecord(final ByteBuffer buffer) {
// magic
final int magic = buffer.getInt();
if (!MagicCodeSupport.isValidMessageLogMagicCode(magic)) {
// visitedBufferSize.set(currentBuffer.getSize());
visitedBufferSize.set(currentBuffer.getSize());
return Optional.of(EMPTY_LOG_RECORD);
}

Expand Down

0 comments on commit 7cd5dde

Please sign in to comment.