ZanderXu commented on PR #4560: URL: https://github.com/apache/hadoop/pull/4560#issuecomment-1221229781
> What's the concern with throwing the exception in in the highestTxId + 1 @xkrogen Master, Maybe our understanding of `sinceTxId == highestTxId + 1` is a bit ambiguous. Please correct me, if I'm wrong. - `sinceTxId == highestTxId + 1` is normal case, especially if the transaction rate is low. So JournalNode should return one empty `GetJournaledEditsResponseProto` to NameNode, not throw `NewerTxnIdException`. - Conversely, if Journal throws a `NewerTxnIdException` to namenode, namenode will fail back to `selectStreamingInputStreams` with `getEditLogManifest` with this `sinceTxId`. Because there is no new edits in JournalNodes, so `selectStreamingInputStreams` will get an empty response too. I try to guess that you mean to use `nextTxId`? If we use `nextTxId`, maybe we can change this code as bellow: ``` if (sinceTxId > nextTxId) { throw new JournaledEditsCache.NewerTxnIdException(...); } ``` Because `sinceTxId == nextTxId` is a normal case, JournalNode should return an empty GetJournaledEditsResponseProto. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org