klsince commented on issue #12667:
URL: https://github.com/apache/pinot/issues/12667#issuecomment-2008277584

   If let consuming thread take copy of bitmaps periodically, then we don't 
need locks between query threads and consuming threads. The consuming thread 
pauses periodically to take the copy of bitmaps as it's the only one modifying 
the bitmaps, and no need to take any locks, it just create a new map of bitmaps 
and replace the old map atomically (using `volatile` variable). 
   
   But a challenge is that some helix threads can also modify bitmaps when 
replacing/adding segments. So we need to coordinate those 'writer' threads with 
a R/W lock, so that only one writer thread can take W lock to take the copy of 
bitmaps, blocking other writer threads from modifying the bitmaps; but all 
writer threads can proceed in parallel if no copy is being taken.


-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to