-
Type:
Sub-task
-
Status: Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: QuorumJournalManager (HDFS-3077)
-
Fix Version/s: QuorumJournalManager (HDFS-3077)
-
Component/s: None
-
Labels:None
-
Target Version/s:
-
Hadoop Flags:Reviewed
Found this bug with randomized testing. The following sequence causes a problem:
- JN writing segment starting at txid 1, and successfully wrote txid 1, but no more
- JN becomes partitioned from NN, and a new NN takes over
- new NN is also partitioned for the "prepareRecovery" phase of recovery, but properly connects for the "acceptRecovery" call
- acceptRecovery copies over a longer log segment (eg txns 1-3) from a good logger
- new NN calls finalizeLogSegment(), but gets the following error: JournalOutOfSyncException: Trying to finalize in-progress log segment 1 to end at txid 3 but only written up to txid 1
This is because the "syncLog" call (which copies the new segment) isn't properly aborting the old segment before replacing it.