virajjasani commented on a change in pull request #1784: URL: https://github.com/apache/hbase/pull/1784#discussion_r431054125
########## File path: hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java ########## @@ -1921,9 +1921,15 @@ public boolean shouldPerformMajorCompaction() throws IOException { // If we're enqueuing a major, clear the force flag. this.forceMajor = this.forceMajor && !request.isMajor(); - // Set common request properties. - // Set priority, either override value supplied by caller or from store. - request.setPriority((priority != Store.NO_PRIORITY) ? priority : getCompactPriority()); + if (request.isAfterSplit()) { Review comment: There are 2 reasons: 1. `isAfterSplit` is an additional field which could be useful for maybe some other info in future also. 2. We already have logic to determine priority present here: `request.setPriority((priority != Store.NO_PRIORITY) ? priority : getCompactPriority());`. Nowhere other than this place, are we using priority setter `request.setPriority(int p)`. So this will provide better alignment and also avoid setting priority in multiple places: `SortedCompactionPolicy`, `StripeCompactionPolicy`. ---------------------------------------------------------------- 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: us...@infra.apache.org