jasonk000 opened a new pull request, #14639:
URL: https://github.com/apache/druid/pull/14639

   Related to #14634.
   
   ### Description
   
   Introduce batching to mitigate some scaling challenges while managing lots 
of segments.
   
   This PR introduces changes to `IndexerSQLMetadataStorageCoordinator` to use 
the JDBI PreparedBatch instead of issuing single update statements inside a 
transaction.
   
   Context - in our environment, bulk cleanup of old segments (O(thousands)) 
stalls the overlord, because the overlord is issuing delete statements. These 
delete statements are done while holding the TaskLockbox lock, which is done 
from the TaskQueue, so the whole overlord locks up until the delete statements 
are complete. By pushing these into a single bulk transaction we should see 
significant improvement.
   
   ##### Key changed/added classes in this PR
    * `IndexerSQLMetadataStorageCoordinator`: use PreparedBatch instead of 
single statements.
   
   <hr>
   
   This PR has:
   
   - [ ] been self-reviewed.
   - [ ] added unit tests or modified existing tests to cover new code paths, 
ensuring the threshold for [code 
coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md)
 is met.
   - [ ] added integration tests.
   - [ ] been tested in a test Druid cluster.
   


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