ConeyLiu commented on code in PR #8292:
URL: https://github.com/apache/iceberg/pull/8292#discussion_r1290982026
##########
core/src/main/java/org/apache/iceberg/io/ResolvingFileIO.java:
##########
@@ -145,49 +143,43 @@ private FileIO io(String location) {
return io;
}
- synchronized (ioInstances) {
- // double check while holding the lock
- io = ioInstances.get(impl);
- if (io != null) {
- return io;
- }
+ return ioInstances.computeIfAbsent(
Review Comment:
We do this after checking `get(key) == null`. So the performance reported by
https://bugs.openjdk.java.net/browse/JDK-8161372 should not be a problem.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]