sunhelly commented on a change in pull request #3831:
URL: https://github.com/apache/hbase/pull/3831#discussion_r753970108
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
##########
@@ -7050,11 +7053,15 @@ String prepareBulkLoad(byte[] family, String srcPath,
boolean copyFile)
HStore store = getStore(family);
try {
if (this.rsServices != null && store.needsCompaction()) {
- this.rsServices.getCompactionRequestor().requestCompaction(this,
store,
- "bulkload hfiles request compaction", Store.PRIORITY_USER + 1,
- CompactionLifeCycleTracker.DUMMY, null);
- LOG.debug("bulkload hfiles request compaction region : {},
family : {}",
- this.getRegionInfo(), family);
+ if
(!this.rsServices.getCompactionRequestor().isUnderCompaction(store)) {
Review comment:
Yes, the compaction of a store has several steps,
1. if needCompact(), add a compaction runner of the store to the queue;
2. select files to compact;
3. do compact the selected files.
If a store is added a compaction runner, but waiting in the queue, then next
needCompact() is still true, and it will be add another compaction runner to
queue.
The isUnderCompaction only means whether a store has added a compaction
runner to the queue.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]