hanishakoneru commented on a change in pull request #276: HDDS-2637. Handle 
LeaderNot ready exception in OzoneManager StateMachine and upgrade ratis to 
latest version.
URL: https://github.com/apache/hadoop-ozone/pull/276#discussion_r351541441
 
 

 ##########
 File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OMRatisSnapshotInfo.java
 ##########
 @@ -98,13 +98,16 @@ private RatisSnapshotYaml readRatisSnapshotYaml() throws 
IOException {
 
   /**
    * Update and persist the snapshot index and term to disk.
-   * @param index new snapshot index to be persisted to disk.
+   * @param lastAppliedTermIndex new snapshot index to be persisted to disk.
    * @throws IOException
    */
-  public void saveRatisSnapshotToDisk(long index) throws IOException {
-    updateSnapshotIndex(index);
+  public void saveRatisSnapshotToDisk(TermIndex lastAppliedTermIndex)
+      throws IOException {
+    updateTermIndex(lastAppliedTermIndex.getTerm(),
+        lastAppliedTermIndex.getIndex());
     writeRatisSnapshotYaml();
-    LOG.info("Saved Ratis Snapshot on the OM with snapshotIndex {}", index);
+    LOG.info("Saved Ratis Snapshot on the OM with snapshotIndex {}",
+        lastAppliedTermIndex);
   }
 
 Review comment:
   updateSnapshotIndex() function is no longer used. We can remove it.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to