apurtell commented on code in PR #4338:
URL: https://github.com/apache/hbase/pull/4338#discussion_r848580369
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java:
##########
@@ -1157,11 +1154,6 @@ protected List<HStoreFile>
doCompaction(CompactionRequestImpl cr,
}
replaceStoreFiles(filesToCompact, sfs, true);
- // This step is necessary for the correctness of
BrokenStoreFileCleanerChore. It lets the
- // CleanerChore know that compaction is done and the file can be cleaned
up if compaction
- // have failed.
- storeEngine.resetCompactionWriter();
Review Comment:
We can leave it in the API, but the current implementation only set the
`writer` field to null, and so the method bodies become empty after that field
is converted into a parameter and they no longer have anything to do, so I
removed it.
If we are going to keep it, we need to use a `Map` instead of `Set` to track
the writers, and somehow need to pass a key as a parameter to abort and remove
a `StoreFileWriter` instance. What should be the key? The
`CompactionRequestImpl`? I do not think there is a requirement to abort
compaction writers in this way. We abort compactions today by interrupting the
thread.
If `BrokenStoreFileCleanerChore` will not function correctly without this,
then it will need modification.
I think `BrokenStoreFileCleanerChore` sees the same results from
`getCompactionTargets` after these changes. When the compaction is finished the
`StoreFileWriter` will be removed from the set in the `finally` block of
`compact`, so `getCompactionTargets` will not include the files being written
by that writer after that point, which is the same thing that happened when
`resetCompactionWriter` would cause the `writer` field in the previous impl to
become null, and also the files being written by that writer would no longer
appear in `getCompactionTargets` results afterward. But the timing has changed,
that is true.
--
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]