adoroszlai commented on code in PR #6383:
URL: https://github.com/apache/ozone/pull/6383#discussion_r1604828402
##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/fs/CachingSpaceUsageSource.java:
##########
@@ -64,6 +68,7 @@ public CachingSpaceUsageSource(SpaceUsageCheckParams params) {
refresh = params.getRefresh();
source = params.getSource();
+ lock = new AutoCloseableReadWriteLock(source.toString());
Review Comment:
`AbstractSpaceUsageSource.toString()` returns `path`. `getPath()` is not
part of the `SpaceUsageSource` interface and I wouldn't add just for this call.
The name of this lock is not too important here. It would only be used for
logging lock/unlock operations, but those are skipped anyway, since all calls
here pass `null, null` instead of real logging method.
--
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]