jtao15 commented on pull request #8422:
URL: https://github.com/apache/pinot/pull/8422#issuecomment-1081206855


   > I feel this is not the correct fix. We should change the 
`computeIfAbsent()` to `compute()` to ensure the `addSegment()` is called 
within the `compute()` block.
   
   This will make the addSegment() to be blocking? This may not be ideal 
because it will slow down the segment download on servers. Is it possible to do 
this async? We are considering two approaches:
   1. The current approach in this pr which tries to increase the segment count 
before `addSegment()`, and decrease the count if `addSegment()` fails in the 
middle.
   2. Another approach is to shutdown the tableDataManager in the background 
thread only if it's not active for a while. We can add `lastModifiedTime` 
whenever segmentDataManagerMap is updated and check both # of segments and 
`lastModifiedTime` to decide if shutdown is needed.


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