szetszwo commented on code in PR #6178:
URL: https://github.com/apache/ozone/pull/6178#discussion_r1487062319
##########
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:
I mean we should keep the `IllegalArgumentException` instead adding this
`LOG.error` message.
The correct way is to fix the datanodes (i.e. to not to report negative used
bytes). Then, the `IllegalArgumentException` will disappear.
--
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]