aayush2761 opened a new pull request, #12053:
URL: https://github.com/apache/ozone/pull/12053

   ## What changes were proposed in this pull request?
   
   When a datanode fails to mark a RECOVERING container for close (for example 
because the .container metadata file cannot be written), the container must 
stay in `ContainerSet.recoveringContainerMap` so 
`StaleRecoveringContainerScrubbingService` can mark it UNHEALTHY after 
`ozone.recovering.container.timeout`. Previously, 
`KeyValueHandler.markContainerForClose` called `removeRecoveringContainer` 
before `KeyValueContainer.markContainerForClose()`. On write failure, 
`updateContainerData` restored RECOVERING in memory, but the scrubber no longer 
saw the container, leaving it untracked and excluded from container
   reports until datanode restart.
   
   This change removes the recovering map entry only after a successful 
transition to CLOSING.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-17021
   
   ## How was this patch tested?
   
   - `mvn -pl :hdds-container-service test 
-Dtest=TestKeyValueHandler#testFailedCloseKeepsRecoveringContainerTracked,TestKeyValueHandler#testFailedCloseRecoveringContainerScrubbedToUnhealthy
 -DskipShade -DskipRecon`
   - `./hadoop-ozone/dev-support/checks/checkstyle.sh`


-- 
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]

Reply via email to