wchevreuil commented on code in PR #4418:
URL: https://github.com/apache/hbase/pull/4418#discussion_r872438844
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/mob/MobFileCleanerChore.java:
##########
@@ -256,9 +274,11 @@ public void cleanupObsoleteMobFiles(Configuration conf,
TableName table) throws
while (rit.hasNext()) {
LocatedFileStatus lfs = rit.next();
Path p = lfs.getPath();
- if (!allActiveMobFileName.contains(p.getName())) {
- // MOB is not in a list of active references, but it can be too
- // fresh, skip it in this case
+ String[] mobParts = p.getName().split("_");
+ String regionName = mobParts[mobParts.length - 1];
+
+ if (!regionNames.contains(regionName)) {
Review Comment:
>AFAIK after split/merge there is a minor compaction that gets rid of the
hfile references and makes sure we have an actual hfile containing the mob file
refs in the child regions before the parent would be archived. So we should
always have a hfile referencing the mob files. But I'll verify this.
I know compaction is triggered, but ain't sure it will always run or
complete (what if there were not many hfiles in the parent?), as it's not
uncommon to see hfile references on store dirs. And how about snapshots clones,
that could have references pointing to archive folder for a while?
--
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]