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

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

                Author: ASF GitHub Bot
            Created on: 13/Jun/19 22:16
            Start Date: 13/Jun/19 22:16
    Worklog Time Spent: 10m 
      Work Description: arp7 commented on pull request #948: HDDS-1649. On 
installSnapshot notification from OM leader, download checkpoint and reload OM 
state
URL: https://github.com/apache/hadoop/pull/948#discussion_r293597766
 
 

 ##########
 File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OzoneManagerStateMachine.java
 ##########
 @@ -171,6 +168,22 @@ public long takeSnapshot() throws IOException {
     return 0;
   }
 
+  /**
+   * Leader OM has purged entries from its log. To catch up, OM must download
+   * the latest checkpoint from the leader OM and install it.
+   * @param firstTermIndexInLog TermIndex of the first append entry available
+   *                           in the Leader's log.
+   * @return the last term index included in the installed snapshot.
+   */
+  public CompletableFuture<TermIndex> notifyInstallSnapshotFromLeader(
+      TermIndex firstTermIndexInLog) {
+    // TODO: Raft server should send the leaderId
+    String leaderId = null;
+    CompletableFuture<TermIndex> future = CompletableFuture
+        .supplyAsync(() -> ozoneManager.installSnapshot(leaderId));
 
 Review comment:
   We should not execute this in the default ForkJoinPool. That can suffer from 
thread exhaustion/deadlock issues since there are very few threads in the 
default pool.
   
   Instead use the overload of `supplyAsync` that accepts an `Executor`.
 
----------------------------------------------------------------
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:
us...@infra.apache.org


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

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

> On installSnapshot notification from OM leader, download checkpoint and 
> reload OM state
> ---------------------------------------------------------------------------------------
>
>                 Key: HDDS-1649
>                 URL: https://issues.apache.org/jira/browse/HDDS-1649
>             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 an OM follower receives installSnapshot notification from OM leader, it 
> should initiate a new checkpoint on the OM leader and download that 
> checkpoint.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to