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

   ## What changes were proposed in this pull request?
   
   In order to support bootstrapping followers, the om snapshot subsystem needs 
to make consistent copies snapshot, including the deleted keys table which can 
be updated at any time.
   
   This means that the background processes modifying the deletedKeys tables 
need to be halted, and then the bootstrapping process needs to wait for the 
double buffer to be flushed, (so that any remaining mods to the deletedKeys 
table is up to date.)
   
   This PR adds the mechanism to allow a thread to wait until the double buffer 
has been flushed.
   
   It is implmented by adding a set of countdown latches one for each thread 
that is waiting.
   
   The latches are initialized to 2, one for each of the buffers in the 
"double" buffer.
   
   Each time a buffer is cleared the latches are decremented once, so that when 
both have been cleared, the waiter will resume.
   
   The other change is to set the double buffer to periodically check for 
waiters when the double buffers are idle.
   
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-8499
   
   ## How was this patch tested?
   
   Unit tests added.
   


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