sajjad-moradi opened a new pull request #7886:
URL: https://github.com/apache/pinot/pull/7886


   ## Description
   If any error happens during object creation of 
`LLRealtimeSegmentDataManager`, the segment goes to ERROR state in External 
View and any attempt via Helix Admin cannot reset the segment from `ERROR -> 
OFFLINE -> CONSUMING`. That's because the associated semaphore of the segment 
never gets released in case of exception and semaphore.acquire() is called in 
constructor of LLRealtimeSegmentDataManager. That means OFFLINE -> CONSUMING 
will always fail.
   The fix is to release the semaphore if an exception is thrown in creation of 
LLRealtimeSegmentDataManager.
   ## Testing Done
   On my local machine, changed the behavior of LLRealtimeSegmentDataManager to 
throw exception only when gets called for the first time. Then ran 
`LLCRealtimeClusterIntegrationTest` and verified the segment went to ERROR 
state in External View. Then using Swagger, called 
`/segments/<tableName>/<segmentName>/reset` REST endpoint and verified that 
segment state turned to OFFLINE. Without the fix, transition from OFFLINE to 
CONSUMING failed in acquiring semaphore. With the fix, the segment successfully 
went from OFFLINE to CONSUMING.


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