You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/06/15 00:29:12 UTC

[GitHub] [ozone] errose28 opened a new pull request, #3515: HDDS-6881. [SCM HA finalization] Support finalizing from a Ratis snapshot.

errose28 opened a new pull request, #3515:
URL: https://github.com/apache/ozone/pull/3515

   ## What changes were proposed in this pull request?
   
   Support finalizing a follower SCM from a Ratis snapshot, in case the leader has finalized but purged the logs with the finalization transactions.
   
   ## What is the link to the Apache JIRA
   
   HDDS-6881
   
   ## How was this patch tested?
   
   Integration test added. The integration test will be expanded upon in HDDS-6761 to test leader changes and restarts. For this reason the test has the ability to pause upgrade finalization while failure scenarios are introduced, even though this PR is not using that feature.
   
   **Leaving as draft until CI is green on my fork**


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [ozone] errose28 closed pull request #3515: HDDS-6881. [SCM HA finalization] Support finalizing from a Ratis snapshot.

Posted by GitBox <gi...@apache.org>.
errose28 closed pull request #3515: HDDS-6881. [SCM HA finalization] Support finalizing from a Ratis snapshot.
URL: https://github.com/apache/ozone/pull/3515


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [ozone] errose28 commented on pull request #3515: HDDS-6881. [SCM HA finalization] Support finalizing from a Ratis snapshot.

Posted by GitBox <gi...@apache.org>.
errose28 commented on PR #3515:
URL: https://github.com/apache/ozone/pull/3515#issuecomment-1165866654

   Continuing this in #3534, which builds off of this PR and overwrites some changes made here.


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [ozone] adoroszlai commented on a diff in pull request #3515: HDDS-6881. [SCM HA finalization] Support finalizing from a Ratis snapshot.

Posted by GitBox <gi...@apache.org>.
adoroszlai commented on code in PR #3515:
URL: https://github.com/apache/ozone/pull/3515#discussion_r905855655


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/upgrade/FinalizationStateManagerImpl.java:
##########
@@ -172,6 +188,68 @@ public FinalizationCheckpoint getFinalizationCheckpoint() {
     return currentCheckpoint;
   }
 
+  @Override
+  public void reinitialize(Table<String, String> newFinalizationStore)
+      throws IOException {
+    checkpointLock.writeLock().lock();
+    try {
+      newFinalizationStore.close();
+      this.finalizationStore = newFinalizationStore;

Review Comment:
   Shouldn't `this.finalizationStore` be closed instead of the new one?



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [ozone] errose28 commented on a diff in pull request #3515: HDDS-6881. [SCM HA finalization] Support finalizing from a Ratis snapshot.

Posted by GitBox <gi...@apache.org>.
errose28 commented on code in PR #3515:
URL: https://github.com/apache/ozone/pull/3515#discussion_r906344729


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/upgrade/FinalizationStateManagerImpl.java:
##########
@@ -172,6 +188,68 @@ public FinalizationCheckpoint getFinalizationCheckpoint() {
     return currentCheckpoint;
   }
 
+  @Override
+  public void reinitialize(Table<String, String> newFinalizationStore)
+      throws IOException {
+    checkpointLock.writeLock().lock();
+    try {
+      newFinalizationStore.close();
+      this.finalizationStore = newFinalizationStore;

Review Comment:
   Yes, good catch. I would have thought this would crash the test, but I guess RocksDB didn't free the resources before the snapshot install process read the layout version key. I will fix this in #3534, since that PR builds off this one and this PR is somewhat obsolete now.



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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