Apache9 commented on code in PR #4995:
URL: https://github.com/apache/hbase/pull/4995#discussion_r1099930165
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotHFileCleaner.java:
##########
@@ -64,8 +67,10 @@ public class SnapshotHFileCleaner extends
BaseHFileCleanerDelegate {
@Override
public Iterable<FileStatus> getDeletableFiles(Iterable<FileStatus> files) {
+ List<FileStatus> filesList =
Review Comment:
> The Iterable is lazy evaluated, so if we just pass this Iterable in, we
will access the HFile storage inside the snapshot lock, which could take a lot
of time(for example, several seconds), and block all other operations,
especially other cleaners.
> So here we convert it to List first, to force it evaluated before calling
getUnreferencedFiles, so we will not hold snapshot lock for a long time.
Something like this?
Thanks.
--
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]