szetszwo commented on code in PR #6178:
URL: https://github.com/apache/ozone/pull/6178#discussion_r1480133391
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/tasks/ContainerSizeCountTask.java:
##########
@@ -122,6 +123,11 @@ private void process(ContainerInfo container,
Map<ContainerSizeCountKey, Long> map) {
final ContainerID id = container.containerID();
final long currentSize = container.getUsedBytes();
+ if (currentSize < 0) {
+ LOG.error("Negative container size: {} for container: {}", currentSize,
+ id);
+ return;
+ }
Review Comment:
This will just print the error in a different message instead of fixing it.
Why the `currentSize` could be negative?
--
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]