sumitagrawl commented on code in PR #4395:
URL: https://github.com/apache/ozone/pull/4395#discussion_r1135692628
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/statemachine/background/StaleRecoveringContainerScrubbingService.java:
##########
@@ -84,8 +85,11 @@ static class RecoveringContainerScrubbingTask implements
BackgroundTask {
@Override
public BackgroundTaskResult call() throws Exception {
- containerSet.getContainer(containerID).markContainerUnhealthy();
- LOG.info("Stale recovering container {} marked UNHEALTHY", containerID);
+ Container con = containerSet.getContainer(containerID);
+ if (null != con) {
+ con.markContainerUnhealthy();
Review Comment:
For recoveringFeature, it seems parallel container is removed causing it to
be null. Inside this marking unhealthy, it will write to file which might have
been deleted.
IMO, we should check inside also if container really exist after lock before
update unhealthy.
--
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]