feat: add exclude sources clone query mode#19530
Open
jtuglu1 wants to merge 1 commit into
Open
Conversation
5bbbd52 to
f069444
Compare
Member
FrankChen021
left a comment
There was a problem hiding this comment.
| Severity | Findings |
|---|---|
| P0 | 0 |
| P1 | 1 |
| P2 | 0 |
| P3 | 0 |
| Total | 1 |
excludeSource queries can return cached data for segments that are not served by clone targets when broker segment cache has entries from prior normal queries.
Reviewed 9 of 9 changed files.
Findings that could not be attached inline:
- server/src/main/java/org/apache/druid/client/CachingClusteredClient.java:364 - [P1] excludeSource can reuse source-backed cache entries. With broker segment cache enabled, pruneSegmentsWithCachedResults runs before groupSegmentsByServer applies ServerSelector.pick(..., EXCLUDESOURCE). A prior non-excludeSource query can populate the same segment cache key for a segment that is not on any clone; the excludeSource query then removes that segment from remote querying and merges the cached rows, even though the new mode says segments missing from clones should be omitted. This defeats clone-only load tests and can turn expected partial results into full/source-backed results. Disable broker cache for EXCLUDESOURCE or make cache lookup/keying depend on clone availability/mode.
This is an automated review by Codex GPT-5.5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This adds a case to the
cloneQueryModequery context which only mirrors queries to cloned servers. While this can result in partial query results, this allows for things like mirroring traffic/load testing on cloned servers.Release note
Add
excludeSourcesoption tocloneQueryModequery context parameter.This PR has: