You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2020/07/13 12:50:33 UTC

[GitHub] [hbase] sanjeetnishad95 commented on a change in pull request #2047: [HBASE-24714] Error message is displayed in the UI of table's compact…

sanjeetnishad95 commented on a change in pull request #2047:
URL: https://github.com/apache/hbase/pull/2047#discussion_r453625470



##########
File path: hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java
##########
@@ -3000,7 +3001,12 @@ private void getProcedureResult(long procId, CompletableFuture<Void> future, int
                 // If any region compaction state is MAJOR_AND_MINOR
                 // the table compaction state is MAJOR_AND_MINOR, too.
                 if (err2 != null) {
-                  future.completeExceptionally(unwrapCompletionException(err2));
+                  // api can throw NSRE when the region is not online(split, splitting, merge,
+                  // merging, etc). Those regions will not be filtered above so it's better to skip
+                  // regions which throw NSRE.
+                  if (!(err2.getCause() instanceof NotServingRegionException)) {

Review comment:
       @virajjasani , we are completing the future in later part of the code. Previously we had an `isOffline` flag which was used to filter out the regions which were not online but now we are not updating that flag. This patch just provides a workaround to skip those regions while calculating the compactionState of a table. But yes, I agree there won't be proper info on how the request was completed.
   
   > Just a question: waiting for region to come out of RIT seems valid right?
   This issue isn't specifically only in RITscenarios. Even if the user purposely unassigns a region, the future is completed exceptionally. 
   
   > Due to this issue, are we not able to compact the table ever?
   
   Yes future is completed exceptionally and table will not be compacted ever (the patch doesn't aim to fix this, patch is only for `getCompactionState()` and not for `compact()`).
   
   What do you say? How should we proceed?
   




----------------------------------------------------------------
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:
users@infra.apache.org