keith-turner commented on a change in pull request #2169:
URL: https://github.com/apache/accumulo/pull/2169#discussion_r652168564



##########
File path: 
core/src/main/java/org/apache/accumulo/core/clientImpl/TableOperationsImpl.java
##########
@@ -728,6 +728,7 @@ public void delete(String tableName)
     List<ByteBuffer> args = 
Arrays.asList(ByteBuffer.wrap(tableName.getBytes(UTF_8)));
     Map<String,String> opts = new HashMap<>();
     try {
+      cancelCompaction(tableName);

Review comment:
       To avoid certain race conditions, it would be nice if we did something 
like the following to only resolve the tableName to a tableId once.  However I 
don't see an easy way to do this.
   
    1. tableId = resolveTableId(tableName)
    2. cancelCompaction(tableId)
    3. delete(tableId)
   
   Looking around in the code, this would be easy for cancelCompaction because 
it already resolves the table id client side.  So could create `private 
cancelCompaction(TableId)` used by this method and the public 
`cancelCompaction(String)` method.   However delete table seems like its 
currently passing the table name to the server side where it would resolve the 
table name to a table id server side. I may have missed it but I tried to 
follow the code to the thrift call and did not see anything on the client side 
resolving the table id for delete table.




-- 
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:
[email protected]


Reply via email to