-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Further optimize the efficiency of memtable region scan #16976
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #16976 +/- ##
=========================================
Coverage 39.29% 39.30%
Complexity 212 212
=========================================
Files 5058 5058
Lines 337842 337866 +24
Branches 43026 43036 +10
=========================================
+ Hits 132763 132790 +27
+ Misses 205079 205076 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR optimizes the efficiency of memtable region scan operations by refactoring the iteration logic to access underlying array data structures directly, reducing method call overhead and improving cache locality.
Key Changes:
- Refactored iteration logic in
WritableMemChunkandAlignedWritableMemChunkto use batch array access instead of individual element accessors - Added
getIndices()method toTVListto expose the indices array for optimized access - Added comprehensive test cases to verify the optimization works correctly with deletions and sorted data
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
WritableMemChunkRegionScanTest.java |
Added two new test methods (testAlignedWritableMemChunkRegionScan2 and testNonAlignedWritableMemChunkRegionScan2) that verify region scan behavior with deletions and sorted data |
TVList.java |
Added getIndices() getter method to expose the indices list for optimized batch access |
WritableMemChunk.java |
Refactored getAnySatisfiedTimestamp() to iterate through timestamp, bitmap, and indices arrays directly using nested loops instead of calling accessor methods, improving performance while maintaining correct deletion cursor handling |
AlignedWritableMemChunk.java |
Similar refactoring to use direct array access with nested loops for aligned data, properly handling multi-column null value checks and per-column deletions |
Comments suppressed due to low confidence (1)
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/datastructure/TVList.java:760
- getQueryContextSet exposes the internal representation stored in field queryContextSet. The value may be modified after this call to getQueryContextSet.
getQueryContextSet exposes the internal representation stored in field queryContextSet. The value may be modified after this call to getQueryContextSet.
getQueryContextSet exposes the internal representation stored in field queryContextSet. The value may be modified after this call to getQueryContextSet.
getQueryContextSet exposes the internal representation stored in field queryContextSet. The value may be modified after this call to getQueryContextSet.
getQueryContextSet exposes the internal representation stored in field queryContextSet. The value may be modified after this call to getQueryContextSet.
getQueryContextSet exposes the internal representation stored in field queryContextSet. The value may be modified after this call to getQueryContextSet.
getQueryContextSet exposes the internal representation stored in field queryContextSet. The value may be modified after this call to getQueryContextSet.
getQueryContextSet exposes the internal representation stored in field queryContextSet. The value may be modified after this call to getQueryContextSet.
public Set<QueryContext> getQueryContextSet() {
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.




Description
Further optimize the efficiency of memtable region scan