ArafatKhan2198 commented on code in PR #6508:
URL: https://github.com/apache/ozone/pull/6508#discussion_r1567185401
##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/fs/CachingSpaceUsageSource.java:
##########
@@ -137,9 +139,24 @@ private void refresh() {
//only one `refresh` can be running at a certain moment
if (isRefreshRunning.compareAndSet(false, true)) {
try {
- cachedValue.set(source.getUsedSpace());
+ long newUsedSpace = source.getUsedSpace();
Review Comment:
Yes @adoroszlai , you are correct. Upon reviewing the error logs, I noticed
the refresh method. Initially, I assumed that `SpaceUsageSource` might return a
negative value. However, upon further looking, I realised that it cannot return
negative values, instead, it may return incorrect or zero values. Consequently,
decrementing that value led to the error we encountered.
--
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]