ArafatKhan2198 commented on code in PR #6178:
URL: https://github.com/apache/ozone/pull/6178#discussion_r1480471960
##########
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:
While trying to understand the reason for this underlying abnormality. What
I have noticed from the recon logs of the cluster that reported the issue is
that the containerSizeCountTask detected Negative size for Container IDs: `[ID:
3979, Size: -63] [ID: 3985, Size: -63] [ID: 13509, Size: -33554432]`
Doing a container info on these container ID’s I noticed that these
containers have been in the DELETED state. If the container size is being
fetched after the container is marked for deletion, could there be a scenario
where the size is momentarily calculated or reported as negative??
possibly due to how the deletion process affects the metadata
##########
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:
While trying to understand the reason for this abnormality. What I have
noticed from the recon logs of the cluster that reported the issue is that the
containerSizeCountTask detected Negative size for Container IDs: `[ID: 3979,
Size: -63] [ID: 3985, Size: -63] [ID: 13509, Size: -33554432]`
Doing a container info on these container ID’s I noticed that these
containers have been in the DELETED state. If the container size is being
fetched after the container is marked for deletion, could there be a scenario
where the size is momentarily calculated or reported as negative??
possibly due to how the deletion process affects the metadata
--
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]