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

   ### Problem
   
   Metadata IO is the main bottleneck for segment allocation times, which can 
contribute to lag significantly.
   Currently, the metadata call to fetch used segments limits the allocation 
rate, and contributes to allocation wait time which can grow quite quickly. The 
sum of allocation times is a direct contributor to lag.
   
   
   ### Idea
   
   Segment allocation with `time chunk locking` requires only the segment ids 
and the number of core partitions to determine the next id.
   We can issue a much less expensive call to fetch segmentIds instead of 
segments if the segment payloads are significantly large due to the dimensions 
and metrics.
   The core partitions do not change for a given (datasource, interval, 
version) and we can fetch exactly one segment by id for such combinations and 
reduce the load on the metadata store, and also reduce the time taken to build 
the DataSegment object on the Overlord.
   
   
   ### Usage
   
   Adds a new feature flag
   `druid.indexer.tasklock.segmentAllocationReduceMetadataIO` with default 
value `false`
   
   Setting this flag to true allows segment allocation to fetch only the 
required segmentIds and fewer segment payloads from the metadata store.
   At present, this flag is only applicable for TimeChunk locking with batch 
segment allocation.
   
   
   This PR has:
   
   - [x] been self-reviewed.
      - [ ] using the [concurrency 
checklist](https://github.com/apache/druid/blob/master/dev/code-review/concurrency.md)
 (Remove this item if the PR doesn't have any relation to concurrency.)
   - [ ] added documentation for new or modified features or behaviors.
   - [ ] a release note entry in the PR description.
   - [x] added Javadocs for most classes and all non-trivial methods. Linked 
related entities via Javadoc links.
   - [ ] added or updated version, license, or notice information in 
[licenses.yaml](https://github.com/apache/druid/blob/master/dev/license.md)
   - [x] added comments explaining the "why" and the intent of the code 
wherever would not be obvious for an unfamiliar reader.
   - [x] 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.
   - [x] 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