Fly-Style opened a new pull request, #19212:
URL: https://github.com/apache/druid/pull/19212
This patch:
- allow registration of a new callback in `MetadataSegmentView`.
- when `MetadataSegmentView` finishes a poll from the Coordinator, it
determines the delta of segments added/removed so that it can invoke the
callback accordingly.
- introduces a new class `BrokerServerViewOfLatestUsedSegments` on the
Broker. This class implements TimelineServerView and maintains a full timeline
of all segments (available on historicals, available on indexers/peons, not
available). Here we keep a single timeline for each datasource. When a callback
is received for a segment (with or without server) added or removed, we simply
add it to the respective datasource timeline.
- `timeline.lookup()` will always return the latest complete partition set
in the timeline object, irrespective of whether those segments are available or
not.
- if `metadataSegmentCacheEnable` is false, the new server view class will
throw an exception when any method is invoked since we do not have info of
unavailable segments.
This PR has:
- [ ] 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.
- [ ] added Javadocs for most classes and all non-trivial methods. Linked
related entities via Javadoc links.
- [ ] added comments explaining the "why" and the intent of the code
wherever would not be obvious for an unfamiliar reader.
- [ ] 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]