Apache9 commented on code in PR #6243:
URL: https://github.com/apache/hbase/pull/6243#discussion_r1761250564
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/backup/HFileArchiver.java:
##########
@@ -439,7 +439,7 @@ private static List<File> resolveAndArchive(FileSystem fs,
Path baseArchiveDir,
List<File> failures = new ArrayList<>();
String startTime = Long.toString(start);
- for (File file : toArchive) {
+ toArchive.parallelStream().forEach(file -> {
Review Comment:
There are IO operations in the code block so usually it is not safe to use
parallelStream...
AFAIK parallelStream will make use of a common thread
pool(ForkJoinPool.commonPool IIRC) which could be used by lots of other
operations in java, so it is easy to introduce strange dead locks.
If we want to do it in parallel, we'd better introduce our own thread pool.
--
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]