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

   ## What changes were proposed in this pull request?
   Currently bootstrap lock is acquired after the snapshot is already opened 
thus this can lead to a deadlock condition during bootstrap where the Bootstrap 
flow has already acquired a bootstrap lock and is waiting on snapshot cache 
lock to be acquired which cannot be acquired since the snapshots are still open.
   To fix this all background services should always acquire bootstrap lock 
before opening a snapshot. The only con to this is that the entire task of 
background service would be blocked when the bootstrap copy batch is running on 
the leader om which should be ok since bootstrap would be an infrequent 
operation. 
   However one possible improvement would be to just to create a hardlink(which 
we already do to ensure this file doesn't get deleted by rocksdb operations but 
we also write the file into the Tarball stream synchronously 
https://github.com/apache/ozone/blob/96390ac142725195315906400a633f316c899702/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/Archiver.java#L135-L155)
 to the file to be copied into tar outputStream into a tmp directory under the 
bootstrap lock and write all the entries corresponding to the link created 
outside the lock(The entry should also include the hardLinkFile created in the 
last batch). 
   The above can be done as part of a separate patch @sadanand48 
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-13905
   
   ## How was this patch tested?
   Existing unit tests which was stuck because of the deadlock and marked flaky 
because of 
[272544aa95c66d0743f9ac94b2f4d586b325b8a7](https://github.com/apache/ozone/commit/272544aa95c66d0743f9ac94b2f4d586b325b8a7)
   


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