You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "xichen01 (via GitHub)" <gi...@apache.org> on 2024/03/06 06:12:07 UTC

[PR] HDDS-10143. Fix intermittent failure in testParallelDeleteBucketAndCreateKey [ozone]

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

   ## What changes were proposed in this pull request?
   Fix testParallelDeleteBucketAndCreateKey
   
   The root cause is the `preExecute#resolveBucketAndCheckKeyAcls` of `CreateKey` may execute after `deleteBucket`, then the `CreateKey#preExecute` will throw an exception, so the test will fail.  For fix this, we just need to add the waiting time.
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-10143
   
   
   ## How was this patch tested?
   Before, lots of failures.
   https://github.com/xichen01/ozone/actions/runs/8158284595
   After, All successful
   https://github.com/xichen01/ozone/actions/runs/8158363756


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


Re: [PR] HDDS-10143. Fix intermittent failure in testParallelDeleteBucketAndCreateKey [ozone]

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


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestOzoneRpcClientWithRatis.java:
##########
@@ -323,7 +323,8 @@ public void testParallelDeleteBucketAndCreateKey() throws IOException,
     omSM.getHandler().setInjector(injector);
     thread1.start();
     thread2.start();
-    Thread.sleep(2000);
+    // Wait long enough for createKey's preExecute to finish executing
+    Thread.sleep(10000);

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


Re: [PR] HDDS-10143. Fix intermittent failure in testParallelDeleteBucketAndCreateKey [ozone]

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


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


Re: [PR] HDDS-10143. Fix intermittent failure in testParallelDeleteBucketAndCreateKey [ozone]

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


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestOzoneRpcClientWithRatis.java:
##########
@@ -323,7 +323,8 @@ public void testParallelDeleteBucketAndCreateKey() throws IOException,
     omSM.getHandler().setInjector(injector);
     thread1.start();
     thread2.start();
-    Thread.sleep(2000);
+    // Wait long enough for createKey's preExecute to finish executing
+    Thread.sleep(10000);

Review Comment:
   Yes, but this needs to modify more codes. We need to know the `preExecture` has been executed completely, but the  `preExecture` is a `prviate` method (or we need to add some flag to watch), I don't want ot modify it just for only one testing. 
   Add sleeping time is a dirty but quick solution. How do you think?



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


Re: [PR] HDDS-10143. Fix intermittent failure in testParallelDeleteBucketAndCreateKey [ozone]

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


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestOzoneRpcClientWithRatis.java:
##########
@@ -323,7 +323,8 @@ public void testParallelDeleteBucketAndCreateKey() throws IOException,
     omSM.getHandler().setInjector(injector);
     thread1.start();
     thread2.start();
-    Thread.sleep(2000);
+    // Wait long enough for createKey's preExecute to finish executing
+    Thread.sleep(10000);

Review Comment:
   Can we change this to `waitFor` some explicit condition?



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