ArafatKhan2198 commented on PR #12095:
URL: https://github.com/apache/ozone/pull/12095#issuecomment-7188875670

   Thanks @devmadhuu you were right. A CLOSED copy with an older sequence was 
enough to block the correction on every sync. `hasClosedReplica` now counts a 
CLOSED copy only when its sequence matches the container's.
   
   What was going wrong:
   
   1. The container is at sequence 100. SCM has moved it back to QUASI_CLOSED. 
Recon still shows it as CLOSED.
   2. A datanode reports an old CLOSED copy from sequence 90.
   3. SCM ignores that copy because its sequence does not match the container. 
SCM stays QUASI_CLOSED.
   4. Recon records the copy anyway. The old check only asked "is there any 
CLOSED copy?" and found this one.
   5. Every later sync skipped the correction. Recon stayed CLOSED.
   
   What happens now:
   
   1. The same container is at sequence 100 in Recon, still CLOSED. SCM lists 
it as QUASI_CLOSED.
   2. Recon has the old CLOSED copy at sequence 90, plus the UNHEALTHY copy 
that brought the container back.
   3. The sync now asks "is there a CLOSED copy whose sequence matches the 
container?" The copy at 90 does not match 100, so it does not count.
   4. Recon moves the container to QUASI_CLOSED, the same way SCM did, and 
keeps both copies.
   5. A CLOSED copy whose sequence does match the container still means Recon 
closed it from a current copy that SCM has not processed yet. That container 
stays CLOSED.


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