Fast schema partition fetch for single device query#17493
Conversation
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:
|



To improve the efficiency of single device query.