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

   ## What changes were proposed in this pull request?
   OmSnapshotPurgeRequest updates the snapshot chain and also updates the cache 
& in case of any failure. In case of checked exception thrown, the request 
gobbles up the exception and returns an error response. The problem with this 
is, we have partially updated snapshot info table cache which is not coherrent 
with the snapshot chain and all these changes won't be flushed to disk. On 
restart this could lead to all sorts of snapshot chain & snapshot info 
corruption. 
   
   The proposal here is to make the entire request atomic:
   
   1) Update the snapshot chain & maintain the updated snapshot infos in local 
uncommitted space.
   
   2) In case of an exception, roll back all deleted snapshots by putting it 
back to the snapshot chain(P.S. this needs to be done in the reverse order of 
removal) & return an error response.
   
   3) If no exception is thrown, update the snapshot info table cache.
   
   4) Send it to double buffer
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-11452
   
   ## How was this patch tested?
   Existing unit tests


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