Fast schema partition fetch for single device query#17493
Open
CRZbulabula wants to merge 1 commit intomasterfrom
Open
Fast schema partition fetch for single device query#17493CRZbulabula wants to merge 1 commit intomasterfrom
CRZbulabula wants to merge 1 commit intomasterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Optimizes schema partition response parsing in the DataNode query analyzer to reduce overhead for common “single slot” (often single-device) schema partition fetches, improving single-device query efficiency.
Changes:
- Adds a fast path in
parseSchemaPartitionTableRespwhen only one series partition slot is returned for a database. - Replaces stream-based distinct collection with a
HashSet-based distinct group id collection for the general case.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Map<TSeriesPartitionSlot, TConsensusGroupId> seriesPartitionTable = entry1.getValue(); | ||
|
|
||
| if (seriesPartitionTable.size() == 1) { | ||
| // Fast collection in case of query for single device |
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #17493 +/- ##
============================================
- Coverage 39.84% 39.84% -0.01%
Complexity 312 312
============================================
Files 5136 5136
Lines 347013 347020 +7
Branches 44225 44226 +1
============================================
Hits 138257 138257
- Misses 208756 208763 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.



To improve the efficiency of single device query.