You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "swamirishi (via GitHub)" <gi...@apache.org> on 2023/08/02 19:51:09 UTC

[GitHub] [ozone] swamirishi opened a new pull request, #5139: HDDS-9112. Make snapshot dir wait poll max timeout configurable

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

   ## What changes were proposed in this pull request?
   
   Currently snapshot dir wait poll max timeout value is a constant value. Adding a config for the same.
   Snapshot listing currently throws FileNotFound exception if the directory exists check times out. This should throw a proper error code instead of file not found.
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-9112
   
   ## How was this patch tested?
   Adding a configuration. No testing required.
   


-- 
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] prashantpogde commented on a diff in pull request #5139: HDDS-9112. Make snapshot dir wait poll max timeout configurable

Posted by "prashantpogde (via GitHub)" <gi...@apache.org>.
prashantpogde commented on code in PR #5139:
URL: https://github.com/apache/ozone/pull/5139#discussion_r1282401634


##########
hadoop-hdds/common/src/main/resources/ozone-default.xml:
##########
@@ -3368,6 +3368,13 @@
     <description>Time interval of the SST File filtering service from Snapshot.
     </description>
   </property>
+  <property>
+    <name>ozone.snapshot.dir.check.poll.timeout</name>
+    <value>5s</value>

Review Comment:
   Let's keep this to a minute so that we do not have to worry about even a very large directory with lots of sst files.



-- 
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] swamirishi commented on a diff in pull request #5139: HDDS-9112. Make snapshot dir wait poll max timeout configurable

Posted by "swamirishi (via GitHub)" <gi...@apache.org>.
swamirishi commented on code in PR #5139:
URL: https://github.com/apache/ozone/pull/5139#discussion_r1282639436


##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/OMConfigKeys.java:
##########
@@ -383,6 +383,11 @@ private OMConfigKeys() {
   public static final String
       OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL_DEFAULT = "60s";
 
+  public static final String OZONE_SNAPSHOT_DIR_CHECK_POLL_TIMEOUT =

Review Comment:
   done



-- 
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] swamirishi commented on a diff in pull request #5139: HDDS-9112. Make snapshot dir wait poll max timeout configurable

Posted by "swamirishi (via GitHub)" <gi...@apache.org>.
swamirishi commented on code in PR #5139:
URL: https://github.com/apache/ozone/pull/5139#discussion_r1282496028


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/RDBCheckpointUtils.java:
##########
@@ -45,13 +45,14 @@ private RDBCheckpointUtils() { }
    * Wait for checkpoint directory to be created for 5 secs with 100 millis
    * poll interval.
    * @param file Checkpoint directory.
+   * @param pollMaxDuration max duration for polling
    * @return true if found.
    */
-  public static boolean waitForCheckpointDirectoryExist(File file)
-      throws IOException {
+  public static boolean waitForCheckpointDirectoryExist(File file,
+         Duration pollMaxDuration) {
     Instant start = Instant.now();
     try {
-      with().atMost(POLL_MAX_DURATION)
+      with().atMost(pollMaxDuration)

Review Comment:
   done



-- 
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] smengcl commented on a diff in pull request #5139: HDDS-9112. Make snapshot dir wait poll max timeout configurable

Posted by "smengcl (via GitHub)" <gi...@apache.org>.
smengcl commented on code in PR #5139:
URL: https://github.com/apache/ozone/pull/5139#discussion_r1283065903


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotUtils.java:
##########
@@ -93,15 +94,16 @@ public static void dropColumnFamilyHandle(
   }
 
   /**
-   * Throws OMException FILE_NOT_FOUND if snapshot directory does not exist.
+   * Throws OMException TIMEOUT if snapshot directory does not exist.
    * @param checkpoint Snapshot checkpoint directory
    */
   public static void checkSnapshotDirExist(File checkpoint)
       throws IOException {
     if (!checkpoint.exists()) {
       throw new OMException("Unable to load snapshot. " +
           "Snapshot checkpoint directory '" + checkpoint.getAbsolutePath() +
-          "' does not exists.", FILE_NOT_FOUND);
+          "' does not exists. Please wait a few more seconds before retrying",

Review Comment:
   ```suggestion
             "' does not yet exist. Please wait a few more seconds before retrying",
   ```



-- 
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] hemantk-12 commented on a diff in pull request #5139: HDDS-9112. Make snapshot dir wait poll max timeout configurable

Posted by "hemantk-12 (via GitHub)" <gi...@apache.org>.
hemantk-12 commented on code in PR #5139:
URL: https://github.com/apache/ozone/pull/5139#discussion_r1282407575


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/RDBCheckpointUtils.java:
##########
@@ -45,13 +45,14 @@ private RDBCheckpointUtils() { }
    * Wait for checkpoint directory to be created for 5 secs with 100 millis
    * poll interval.
    * @param file Checkpoint directory.
+   * @param pollMaxDuration max duration for polling
    * @return true if found.
    */
-  public static boolean waitForCheckpointDirectoryExist(File file)
-      throws IOException {
+  public static boolean waitForCheckpointDirectoryExist(File file,
+         Duration pollMaxDuration) {
     Instant start = Instant.now();
     try {
-      with().atMost(POLL_MAX_DURATION)
+      with().atMost(pollMaxDuration)

Review Comment:
   Also change the LOG message at line 66.



-- 
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] smengcl commented on a diff in pull request #5139: HDDS-9112. Make snapshot dir wait poll max timeout configurable

Posted by "smengcl (via GitHub)" <gi...@apache.org>.
smengcl commented on code in PR #5139:
URL: https://github.com/apache/ozone/pull/5139#discussion_r1282400651


##########
hadoop-hdds/common/src/main/resources/ozone-default.xml:
##########
@@ -3368,6 +3368,13 @@
     <description>Time interval of the SST File filtering service from Snapshot.
     </description>
   </property>
+  <property>
+    <name>ozone.snapshot.dir.check.poll.timeout</name>
+    <value>5s</value>
+    <tag>OZONE, PERFORMANCE, OM</tag>
+    <description>Max poll timeout for snapshot dir exists check performed before loading a snapshot in cache.

Review Comment:
   ```suggestion
       <description>Max poll timeout for snapshot dir exists check performed before loading a snapshot in cache. Unit defaults to millisecond if a unit is not specified.
   ```



-- 
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] smengcl commented on a diff in pull request #5139: HDDS-9112. Make snapshot dir wait poll max timeout configurable

Posted by "smengcl (via GitHub)" <gi...@apache.org>.
smengcl commented on code in PR #5139:
URL: https://github.com/apache/ozone/pull/5139#discussion_r1282400651


##########
hadoop-hdds/common/src/main/resources/ozone-default.xml:
##########
@@ -3368,6 +3368,13 @@
     <description>Time interval of the SST File filtering service from Snapshot.
     </description>
   </property>
+  <property>
+    <name>ozone.snapshot.dir.check.poll.timeout</name>
+    <value>5s</value>
+    <tag>OZONE, PERFORMANCE, OM</tag>
+    <description>Max poll timeout for snapshot dir exists check performed before loading a snapshot in cache.

Review Comment:
   ```suggestion
       <description>Max poll timeout for snapshot dir exists check performed before loading a snapshot in cache. Defaults to millisecond if a unit is not specified.
   ```



-- 
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] smengcl commented on a diff in pull request #5139: HDDS-9112. Make snapshot dir wait poll max timeout configurable

Posted by "smengcl (via GitHub)" <gi...@apache.org>.
smengcl commented on code in PR #5139:
URL: https://github.com/apache/ozone/pull/5139#discussion_r1282397929


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotUtils.java:
##########
@@ -101,7 +102,7 @@ public static void checkSnapshotDirExist(File checkpoint)
     if (!checkpoint.exists()) {
       throw new OMException("Unable to load snapshot. " +
           "Snapshot checkpoint directory '" + checkpoint.getAbsolutePath() +
-          "' does not exists.", FILE_NOT_FOUND);
+          "' does not exists.", TIMEOUT);

Review Comment:
   ```suggestion
             "' does not exist yet. Please wait before retrying.", TIMEOUT);
   ```



-- 
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] smengcl commented on pull request #5139: HDDS-9112. Make snapshot dir wait poll max timeout configurable

Posted by "smengcl (via GitHub)" <gi...@apache.org>.
smengcl commented on PR #5139:
URL: https://github.com/apache/ozone/pull/5139#issuecomment-1664416898

   Thanks @swamirishi for the patch. Thanks @prashantpogde @hemantk-12 @DaveTeng0 for reviewing.


-- 
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] smengcl commented on a diff in pull request #5139: HDDS-9112. Make snapshot dir wait poll max timeout configurable

Posted by "smengcl (via GitHub)" <gi...@apache.org>.
smengcl commented on code in PR #5139:
URL: https://github.com/apache/ozone/pull/5139#discussion_r1282401687


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/RDBCheckpointUtils.java:
##########
@@ -67,4 +68,15 @@ public static boolean waitForCheckpointDirectoryExist(File file)
       return false;
     }
   }
+
+  /**
+   * Wait for checkpoint directory to be created for 5 secs with 100 millis
+   * poll interval.
+   * @param file Checkpoint directory.
+   * @return true if found.
+   */
+  public static boolean waitForCheckpointDirectoryExist(File file)

Review Comment:
   ```suggestion
     @VisibleForTesting
     public static boolean waitForCheckpointDirectoryExist(File file)
   ```



-- 
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] smengcl commented on a diff in pull request #5139: HDDS-9112. Make snapshot dir wait poll max timeout configurable

Posted by "smengcl (via GitHub)" <gi...@apache.org>.
smengcl commented on code in PR #5139:
URL: https://github.com/apache/ozone/pull/5139#discussion_r1282397929


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotUtils.java:
##########
@@ -101,7 +102,7 @@ public static void checkSnapshotDirExist(File checkpoint)
     if (!checkpoint.exists()) {
       throw new OMException("Unable to load snapshot. " +
           "Snapshot checkpoint directory '" + checkpoint.getAbsolutePath() +
-          "' does not exists.", FILE_NOT_FOUND);
+          "' does not exists.", TIMEOUT);

Review Comment:
   ```suggestion
             "' does not exist yet. Please wait a few more seconds before retrying.", TIMEOUT);
   ```



-- 
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] smengcl merged pull request #5139: HDDS-9112. Make snapshot dir wait poll max timeout configurable

Posted by "smengcl (via GitHub)" <gi...@apache.org>.
smengcl merged PR #5139:
URL: https://github.com/apache/ozone/pull/5139


-- 
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] hemantk-12 commented on a diff in pull request #5139: HDDS-9112. Make snapshot dir wait poll max timeout configurable

Posted by "hemantk-12 (via GitHub)" <gi...@apache.org>.
hemantk-12 commented on code in PR #5139:
URL: https://github.com/apache/ozone/pull/5139#discussion_r1282392241


##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/OMConfigKeys.java:
##########
@@ -383,6 +383,11 @@ private OMConfigKeys() {
   public static final String
       OZONE_SNAPSHOT_SST_FILTERING_SERVICE_INTERVAL_DEFAULT = "60s";
 
+  public static final String OZONE_SNAPSHOT_DIR_CHECK_POLL_TIMEOUT =

Review Comment:
   nit: 
   1. I think OM specific keys are supposed to follow `ozone.om.*`.
   2. may be `ozone.om.snapshot.checkpoint.dir.creation.poll.timeout` .



##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/RDBCheckpointUtils.java:
##########
@@ -45,13 +45,14 @@ private RDBCheckpointUtils() { }
    * Wait for checkpoint directory to be created for 5 secs with 100 millis
    * poll interval.
    * @param file Checkpoint directory.
+   * @param pollMaxDuration max duration for polling
    * @return true if found.
    */
-  public static boolean waitForCheckpointDirectoryExist(File file)
-      throws IOException {
+  public static boolean waitForCheckpointDirectoryExist(File file,
+         Duration pollMaxDuration) {

Review Comment:
   nit: alignment is not correct.



-- 
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] swamirishi commented on a diff in pull request #5139: HDDS-9112. Make snapshot dir wait poll max timeout configurable

Posted by "swamirishi (via GitHub)" <gi...@apache.org>.
swamirishi commented on code in PR #5139:
URL: https://github.com/apache/ozone/pull/5139#discussion_r1282638693


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/RDBCheckpointUtils.java:
##########
@@ -67,4 +68,15 @@ public static boolean waitForCheckpointDirectoryExist(File file)
       return false;
     }
   }
+
+  /**
+   * Wait for checkpoint directory to be created for 5 secs with 100 millis
+   * poll interval.
+   * @param file Checkpoint directory.
+   * @return true if found.
+   */
+  public static boolean waitForCheckpointDirectoryExist(File file)

Review Comment:
   yeah checked the usage. We should be good here. It throws an IOException in the case the directory doesn't exist in the bootstrapping code. It would retry once again if it fails.



-- 
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] hemantk-12 commented on a diff in pull request #5139: HDDS-9112. Make snapshot dir wait poll max timeout configurable

Posted by "hemantk-12 (via GitHub)" <gi...@apache.org>.
hemantk-12 commented on code in PR #5139:
URL: https://github.com/apache/ozone/pull/5139#discussion_r1282399837


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotUtils.java:
##########
@@ -101,7 +102,7 @@ public static void checkSnapshotDirExist(File checkpoint)
     if (!checkpoint.exists()) {
       throw new OMException("Unable to load snapshot. " +
           "Snapshot checkpoint directory '" + checkpoint.getAbsolutePath() +
-          "' does not exists.", FILE_NOT_FOUND);
+          "' does not exists.", TIMEOUT);

Review Comment:
   Please change the `TIMEOUT` in javadoc as well.



-- 
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] hemantk-12 commented on a diff in pull request #5139: HDDS-9112. Make snapshot dir wait poll max timeout configurable

Posted by "hemantk-12 (via GitHub)" <gi...@apache.org>.
hemantk-12 commented on code in PR #5139:
URL: https://github.com/apache/ozone/pull/5139#discussion_r1282410673


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/RDBCheckpointUtils.java:
##########
@@ -67,4 +68,15 @@ public static boolean waitForCheckpointDirectoryExist(File file)
       return false;
     }
   }
+
+  /**
+   * Wait for checkpoint directory to be created for 5 secs with 100 millis
+   * poll interval.
+   * @param file Checkpoint directory.
+   * @return true if found.
+   */
+  public static boolean waitForCheckpointDirectoryExist(File file)

Review Comment:
   This is use by [bootstrapping code](https://github.com/apache/ozone/blob/6113470e667f31955d4a044a56871c21bbe591de/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMDBCheckpointServlet.java#L247). Not sure if we need to change `waitForCheckpointDirectoryExist(File file)` to `waitForCheckpointDirectoryExist(File file, Duration timeout)` in bootstrapping?
   
   My understanding is that doublebuffer must have flushed by the time we are her. Please double checked to make sure.



-- 
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] prashantpogde commented on a diff in pull request #5139: HDDS-9112. Make snapshot dir wait poll max timeout configurable

Posted by "prashantpogde (via GitHub)" <gi...@apache.org>.
prashantpogde commented on code in PR #5139:
URL: https://github.com/apache/ozone/pull/5139#discussion_r1282402598


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/RDBCheckpointUtils.java:
##########
@@ -67,4 +68,15 @@ public static boolean waitForCheckpointDirectoryExist(File file)
       return false;
     }
   }
+
+  /**
+   * Wait for checkpoint directory to be created for 5 secs with 100 millis

Review Comment:
   update comments. Default value a minute.



-- 
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] swamirishi commented on a diff in pull request #5139: HDDS-9112. Make snapshot dir wait poll max timeout configurable

Posted by "swamirishi (via GitHub)" <gi...@apache.org>.
swamirishi commented on code in PR #5139:
URL: https://github.com/apache/ozone/pull/5139#discussion_r1282638834


##########
hadoop-hdds/common/src/main/resources/ozone-default.xml:
##########
@@ -3368,6 +3368,13 @@
     <description>Time interval of the SST File filtering service from Snapshot.
     </description>
   </property>
+  <property>
+    <name>ozone.snapshot.dir.check.poll.timeout</name>
+    <value>5s</value>

Review Comment:
   Changed it 20secs



##########
hadoop-hdds/common/src/main/resources/ozone-default.xml:
##########
@@ -3368,6 +3368,13 @@
     <description>Time interval of the SST File filtering service from Snapshot.
     </description>
   </property>
+  <property>
+    <name>ozone.snapshot.dir.check.poll.timeout</name>
+    <value>5s</value>
+    <tag>OZONE, PERFORMANCE, OM</tag>
+    <description>Max poll timeout for snapshot dir exists check performed before loading a snapshot in cache.

Review Comment:
   done



-- 
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] swamirishi commented on a diff in pull request #5139: HDDS-9112. Make snapshot dir wait poll max timeout configurable

Posted by "swamirishi (via GitHub)" <gi...@apache.org>.
swamirishi commented on code in PR #5139:
URL: https://github.com/apache/ozone/pull/5139#discussion_r1282634096


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/RDBCheckpointUtils.java:
##########
@@ -42,16 +42,17 @@ public final class RDBCheckpointUtils {
   private RDBCheckpointUtils() { }
 
   /**
-   * Wait for checkpoint directory to be created for 5 secs with 100 millis
+   * Wait for checkpoint directory to be created with 100 millis
    * poll interval.
    * @param file Checkpoint directory.
+   * @param pollMaxDuration max duration for polling
    * @return true if found.
    */
-  public static boolean waitForCheckpointDirectoryExist(File file)
-      throws IOException {
+  public static boolean waitForCheckpointDirectoryExist(File file,
+      Duration pollMaxDuration) {

Review Comment:
   done



##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/RDBCheckpointUtils.java:
##########
@@ -42,16 +42,17 @@ public final class RDBCheckpointUtils {
   private RDBCheckpointUtils() { }
 
   /**
-   * Wait for checkpoint directory to be created for 5 secs with 100 millis
+   * Wait for checkpoint directory to be created with 100 millis

Review Comment:
   done



-- 
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] swamirishi commented on a diff in pull request #5139: HDDS-9112. Make snapshot dir wait poll max timeout configurable

Posted by "swamirishi (via GitHub)" <gi...@apache.org>.
swamirishi commented on code in PR #5139:
URL: https://github.com/apache/ozone/pull/5139#discussion_r1282634566


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/RDBCheckpointUtils.java:
##########
@@ -67,4 +68,15 @@ public static boolean waitForCheckpointDirectoryExist(File file)
       return false;
     }
   }
+
+  /**
+   * Wait for checkpoint directory to be created for 5 secs with 100 millis

Review Comment:
   changed the default value to 20 secs, 60 secs seems too long.



-- 
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] swamirishi commented on a diff in pull request #5139: HDDS-9112. Make snapshot dir wait poll max timeout configurable

Posted by "swamirishi (via GitHub)" <gi...@apache.org>.
swamirishi commented on code in PR #5139:
URL: https://github.com/apache/ozone/pull/5139#discussion_r1282639266


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotUtils.java:
##########
@@ -101,7 +102,7 @@ public static void checkSnapshotDirExist(File checkpoint)
     if (!checkpoint.exists()) {
       throw new OMException("Unable to load snapshot. " +
           "Snapshot checkpoint directory '" + checkpoint.getAbsolutePath() +
-          "' does not exists.", FILE_NOT_FOUND);
+          "' does not exists.", TIMEOUT);

Review Comment:
   done



##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/RDBCheckpointUtils.java:
##########
@@ -45,13 +45,14 @@ private RDBCheckpointUtils() { }
    * Wait for checkpoint directory to be created for 5 secs with 100 millis
    * poll interval.
    * @param file Checkpoint directory.
+   * @param pollMaxDuration max duration for polling
    * @return true if found.
    */
-  public static boolean waitForCheckpointDirectoryExist(File file)
-      throws IOException {
+  public static boolean waitForCheckpointDirectoryExist(File file,
+         Duration pollMaxDuration) {

Review Comment:
   done



-- 
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] hemantk-12 commented on a diff in pull request #5139: HDDS-9112. Make snapshot dir wait poll max timeout configurable

Posted by "hemantk-12 (via GitHub)" <gi...@apache.org>.
hemantk-12 commented on code in PR #5139:
URL: https://github.com/apache/ozone/pull/5139#discussion_r1282399837


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotUtils.java:
##########
@@ -101,7 +102,7 @@ public static void checkSnapshotDirExist(File checkpoint)
     if (!checkpoint.exists()) {
       throw new OMException("Unable to load snapshot. " +
           "Snapshot checkpoint directory '" + checkpoint.getAbsolutePath() +
-          "' does not exists.", FILE_NOT_FOUND);
+          "' does not exists.", TIMEOUT);

Review Comment:
   Please change the `TIMEOUT` in javadoc as well at line number 97.



-- 
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] hemantk-12 commented on a diff in pull request #5139: HDDS-9112. Make snapshot dir wait poll max timeout configurable

Posted by "hemantk-12 (via GitHub)" <gi...@apache.org>.
hemantk-12 commented on code in PR #5139:
URL: https://github.com/apache/ozone/pull/5139#discussion_r1282503289


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/RDBCheckpointUtils.java:
##########
@@ -42,16 +42,17 @@ public final class RDBCheckpointUtils {
   private RDBCheckpointUtils() { }
 
   /**
-   * Wait for checkpoint directory to be created for 5 secs with 100 millis
+   * Wait for checkpoint directory to be created with 100 millis
    * poll interval.
    * @param file Checkpoint directory.
+   * @param pollMaxDuration max duration for polling
    * @return true if found.
    */
-  public static boolean waitForCheckpointDirectoryExist(File file)
-      throws IOException {
+  public static boolean waitForCheckpointDirectoryExist(File file,
+      Duration pollMaxDuration) {

Review Comment:
   nit: 
   ```suggestion
         Duration maxWaitTimeout) {
   ```



##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/RDBCheckpointUtils.java:
##########
@@ -42,16 +42,17 @@ public final class RDBCheckpointUtils {
   private RDBCheckpointUtils() { }
 
   /**
-   * Wait for checkpoint directory to be created for 5 secs with 100 millis
+   * Wait for checkpoint directory to be created with 100 millis

Review Comment:
   nit: 
   
   ```suggestion
      * Wait for checkpoint directory to be created for the given duration with 100 millis
      * poll interval.
      * @param file Checkpoint directory.
      * @param maxWaitTimeout wait at most before request timeout and returns false.
      * @return true if found within given timeout.
   ```



-- 
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] hemantk-12 commented on a diff in pull request #5139: HDDS-9112. Make snapshot dir wait poll max timeout configurable

Posted by "hemantk-12 (via GitHub)" <gi...@apache.org>.
hemantk-12 commented on code in PR #5139:
URL: https://github.com/apache/ozone/pull/5139#discussion_r1282410673


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/RDBCheckpointUtils.java:
##########
@@ -67,4 +68,15 @@ public static boolean waitForCheckpointDirectoryExist(File file)
       return false;
     }
   }
+
+  /**
+   * Wait for checkpoint directory to be created for 5 secs with 100 millis
+   * poll interval.
+   * @param file Checkpoint directory.
+   * @return true if found.
+   */
+  public static boolean waitForCheckpointDirectoryExist(File file)

Review Comment:
   This is use by [bootstrapping code](https://github.com/apache/ozone/blob/6113470e667f31955d4a044a56871c21bbe591de/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMDBCheckpointServlet.java#L247). Not sure if we need to change `waitForCheckpointDirectoryExist(File file)` to `waitForCheckpointDirectoryExist(File file, Duration timeout)` in bootstrapping?
   
   My understanding is that doublebuffer must have flushed by the time we are here. Please double checked to make sure.



-- 
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] hemantk-12 commented on a diff in pull request #5139: HDDS-9112. Make snapshot dir wait poll max timeout configurable

Posted by "hemantk-12 (via GitHub)" <gi...@apache.org>.
hemantk-12 commented on code in PR #5139:
URL: https://github.com/apache/ozone/pull/5139#discussion_r1282410673


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/RDBCheckpointUtils.java:
##########
@@ -67,4 +68,15 @@ public static boolean waitForCheckpointDirectoryExist(File file)
       return false;
     }
   }
+
+  /**
+   * Wait for checkpoint directory to be created for 5 secs with 100 millis
+   * poll interval.
+   * @param file Checkpoint directory.
+   * @return true if found.
+   */
+  public static boolean waitForCheckpointDirectoryExist(File file)

Review Comment:
   This is use by [bootstrapping code](https://github.com/apache/ozone/blob/6113470e667f31955d4a044a56871c21bbe591de/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMDBCheckpointServlet.java#L247). Not sure if we need to change `waitForCheckpointDirectoryExist(File file)` to `waitForCheckpointDirectoryExist(File file, Duration timeout)` in bootstrapping?



-- 
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] swamirishi commented on a diff in pull request #5139: HDDS-9112. Make snapshot dir wait poll max timeout configurable

Posted by "swamirishi (via GitHub)" <gi...@apache.org>.
swamirishi commented on code in PR #5139:
URL: https://github.com/apache/ozone/pull/5139#discussion_r1283315759


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotUtils.java:
##########
@@ -93,15 +94,16 @@ public static void dropColumnFamilyHandle(
   }
 
   /**
-   * Throws OMException FILE_NOT_FOUND if snapshot directory does not exist.
+   * Throws OMException TIMEOUT if snapshot directory does not exist.
    * @param checkpoint Snapshot checkpoint directory
    */
   public static void checkSnapshotDirExist(File checkpoint)
       throws IOException {
     if (!checkpoint.exists()) {
       throw new OMException("Unable to load snapshot. " +
           "Snapshot checkpoint directory '" + checkpoint.getAbsolutePath() +
-          "' does not exists.", FILE_NOT_FOUND);
+          "' does not exists. Please wait a few more seconds before retrying",

Review Comment:
   done



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