jihoonson commented on issue #6336: update insert pending segments logic to 
synchronous
URL: https://github.com/apache/incubator-druid/pull/6336#issuecomment-450679442
 
 
   @QiuMM thank you for trying it out! I understand what you feel when the UI 
is very slow. We need to fix this.
   
   It sounds like the too many concurrent segmentAllocateActions is causing 
this problem, but, I don't understand why it's still slow with the granular 
locking. The `segmentAllocateAction` calls 2 methods of `taskLockbox`. 
   
   1) It calls `tryLock` to get a taskLock. This method is coordinated by a 
single `giant` lock.
   2) Once it gets a taskLock, it calls `allocatePendingSegmentAction` in 
`doInCriticalSection` or (`doInSyncDataSourceAndInterval`).
   
   Before this PR, `2.` was executed outside of `doInCriticalSection`, so there 
was no coordination. And now with `doInSyncDataSourceAndInterval`, there should 
be no lock contention between tasks unless they are replica tasks. Then, I 
think this should work as it was before this PR (or work with a little lock 
contention between replicas). Do you know what method is the bottleneck 
exactly? Probably checking overlord's stack trace would be helpful.
   
   Regarding the exception of `io.druid.java.util.common.ISE: Segments not 
covered by locks for task`, this happens when a task tries to publish new 
segments and update the metadata store without a valid taskLock. Since the 
taskLock must be acquired before calling `allocatePendingSegmentAction` in 
`doInSyncDataSourceAndInterval`, I don't think this exception is related to the 
granular locking. Is it possible that some tasks revoked other task locks by 
any chance?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to