captainzmc commented on a change in pull request #1296:
URL: https://github.com/apache/hadoop-ozone/pull/1296#discussion_r485570651
##########
File path:
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmVolumeArgs.java
##########
@@ -46,6 +47,7 @@
private long quotaInBytes;
private long quotaInCounts;
private final OmOzoneAclMap aclMap;
+ private LongAdder quotaUsageInBytes = new LongAdder();
Review comment:
QuotaUsageInBytes is a property of Volume that needs to be updated each
time when CreateKey, AllocateBlock, CommitKey, DeleteKey, and the lock of
Volume is usually used.
Previously, only Bucket locks were used for these operation, and Volume
locks can greatly affect the concurrency performance of different buckets.
So to avoid Volume locking for performance, LongAdder is used here to
complete the atomic update of quotaUsageInBytes.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]