You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2021/10/06 17:22:46 UTC

[GitHub] [accumulo] dlmarion commented on a change in pull request #2304: ConcurrentDeleteTableIT bug fix and improvements

dlmarion commented on a change in pull request #2304:
URL: https://github.com/apache/accumulo/pull/2304#discussion_r723522668



##########
File path: test/src/main/java/org/apache/accumulo/test/functional/ConcurrentDeleteTableIT.java
##########
@@ -269,12 +228,53 @@ protected void doTableOp() throws Exception {
     }
   }
 
+  private abstract static class DelayedTableOp implements Runnable {
+    private final CountDownLatch cdl;
+
+    DelayedTableOp(CountDownLatch cdl) {
+      this.cdl = cdl;
+    }
+
+    @Override
+    public void run() {
+      try {
+        cdl.countDown();
+        cdl.await();
+        Thread.sleep(10);
+        doTableOp();
+      } catch (TableNotFoundException | TableOfflineException e) {
+        // expected
+      } catch (RuntimeException e) {
+        throw e;
+      } catch (Exception e) {
+        if (e.getCause().getClass().equals(ThriftTableOperationException.class)
+            && e.getMessage().equals("Table is being deleted")) {

Review comment:
       It might be useful to make `Table is being deleted` a static variable in `CompactionDriver` or `TableOperationsImpl`, then reference it from here  `CompactionDriverTest` and `TableOperationsImpl`.




-- 
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: notifications-unsubscribe@accumulo.apache.org

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