hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Work logged] (HDDS-1827) Load Snapshot info when OM Ratis server starts
Date Thu, 15 Aug 2019 18:51:00 GMT

     [ https://issues.apache.org/jira/browse/HDDS-1827?focusedWorklogId=295664&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-295664
]

ASF GitHub Bot logged work on HDDS-1827:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 15/Aug/19 18:50
            Start Date: 15/Aug/19 18:50
    Worklog Time Spent: 10m 
      Work Description: hanishakoneru commented on pull request #1130: HDDS-1827. Load Snapshot
info when OM Ratis server starts.
URL: https://github.com/apache/hadoop/pull/1130#discussion_r314449239
 
 

 ##########
 File path: hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/ratis/TestOzoneManagerRatisServer.java
 ##########
 @@ -126,6 +130,24 @@ public void testStartOMRatisServer() throws Exception {
         LifeCycle.State.RUNNING, omRatisServer.getServerState());
   }
 
+  @Test
+  public void testLoadSnapshotInfoOnStart() throws Exception {
+    // Stop the Ratis server and manually update the snapshotInfo.
+    long oldSnaphsotIndex = ozoneManager.saveRatisSnapshot();
+    ozoneManager.getSnapshotInfo().saveRatisSnapshotToDisk(oldSnaphsotIndex);
+    omRatisServer.stop();
+    long newSnapshotIndex = oldSnaphsotIndex + 100;
+    ozoneManager.getSnapshotInfo().saveRatisSnapshotToDisk(newSnapshotIndex);
+
+    // Start new Ratis server. It should pick up and load the new SnapshotInfo
+    omRatisServer = OzoneManagerRatisServer.newOMRatisServer(conf, ozoneManager,
+        omNodeDetails, Collections.emptyList());
+    omRatisServer.start();
 
 Review comment:
   omRatisServer is stopped when shutdown() is executed.
 
----------------------------------------------------------------
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:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 295664)
    Time Spent: 40m  (was: 0.5h)

> Load Snapshot info when OM Ratis server starts
> ----------------------------------------------
>
>                 Key: HDDS-1827
>                 URL: https://issues.apache.org/jira/browse/HDDS-1827
>             Project: Hadoop Distributed Data Store
>          Issue Type: Sub-task
>            Reporter: Hanisha Koneru
>            Assignee: Hanisha Koneru
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> When Ratis server is starting it looks for the latest snapshot to load it. Even though
OM does not save snapshots via Ratis, we need to load the saved snaphsot index into Ratis
so that the LogAppender knows to not look for logs before the snapshot index. Otherwise, Ratis
will replay the logs from beginning every time it starts up.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message