This is because we remove the SnapshotSentinel from snapshotHandlers in SnapshotManager#cleanupSentinels. Only when the following 3 case, the cleanupSentinels will be called:
So if no isSnapshotDone called, or no further snapshot taking, or snapshot restore/clone. the SnapshotSentinel will always be keep in snapshotHandlers.
HBASE-21387, Only when no snapshot taking, the SnapshotHFileCleaner will check the unref files and clean.
I found this bug, because in our XiaoMi branch-2, we implement the soft delete feature, which means if someone delete a table, then master will create a snapshot firstly, after that, the table deletion begain. the implementation is quite simple, we use the snapshotManager to create a snapshot.
In the master, I found the endless log after delete a table:
This is because the snapshotHandlers never be cleaned after call the snapshotManager#takeSnapshot. I think the asynSnapshot may has the same problem.