BukrosSzabolcs commented on code in PR #4418:
URL: https://github.com/apache/hbase/pull/4418#discussion_r872405927
##########
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:
`allActiveMobFileName` does not contain files currently being written.
MobFileCleanerChore is restricted by `!regionNames.contains(regionName)` to
only clean mob files where the creating region is already archived and we do
not have to care about currently written files.
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.
--
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]