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

   ## What changes were proposed in this pull request?
   Recon makes a temporary checkpoint (a full copy of the OM DB) each time it 
reinitializes tasks, and is supposed to delete it afterwards. This PR fixes two 
bugs in that flow.
   
   **1. Leaked checkpoints fill the disk (regression from HDDS-13809).**
   HDDS-13809 started reading the checkpoint's location *after* closing the DB 
store, but closing sets the store to `null`, so the location was lost and the 
checkpoint directory was never deleted. These copies pile up and fill the disk 
(~501 GB seen in `/var/lib/hadoop-ozone/recon`). This reverts the Recon-side 
part of HDDS-13809 so the location is captured *before* closing, then deleted. 
The OM-side changes from HDDS-13809 are correct and left as-is.
   
   **2. NPE crash on startup when the OM DB is missing.**
   If the local OM DB is gone but old task-status rows remain, startup tries to 
checkpoint a `null` store and crashes:
   
   ```
   NullPointerException: ...getStore() is null at 
ReconTaskControllerImpl.cleanTempCheckPointPath(...)
   ```
   
   The HTTP server is already up, so Recon looks alive but the datanode service 
never starts and datanodes show as DEAD. This adds null-store guards and skips 
reinitialization when the OM DB isn't loaded yet, so the normal full-snapshot 
sync downloads a fresh OM DB instead of crashing.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-16091
   
   ## How was this patch tested?
   
   - Updated unit test 
`TestReconTaskControllerImpl#testProcessReInitializationEventWithCheckpointedManager`.


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