Siyao Meng created HDDS-16086:
---------------------------------

             Summary: OM transaction info is inconsistent with the installed 
checkpoint index
                 Key: HDDS-16086
                 URL: https://issues.apache.org/jira/browse/HDDS-16086
             Project: Apache Ozone
          Issue Type: Bug
            Reporter: Siyao Meng
            Assignee: Siyao Meng


Two functions write the in-memory transaction info of the OM, and they write 
different values.
 
{\{loadSnapshotInfoFromDB()}} reads the value from the installed checkpoint DB. 
This value is correct.
[installCheckpoint|https://github.com/apache/ozone/blob/fb9f30b88694f8fcc876af786d38b86a2aa89d76/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java#L4387]
writes the TermIndex from before the installation, but the next line
[unpauses|https://github.com/apache/ozone/blob/fb9f30b88694f8fcc876af786d38b86a2aa89d76/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java#L4388]
the state machine at the index of the checkpoint:
 
{code:java}
setTransactionInfo(TransactionInfo.valueOf(termIndex)); // pre-install
omRatisServer.getOmStateMachine().unpause(lastAppliedIndex, term); // 
checkpoint index
{code}
 
`OzoneManagerStateMachine.getLatestSnapshot()` gives this field to Ratis. Ratis 
corrects it later, on another thread, when `StateMachineUpdater.reload()` calls 
`reinitialize()`.
 
A TLA+ model of the follower snapshot-installation path found this issue.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to