Skip to content

[to dev/1.3] Prevent aligned LAST query from hanging with time filter#18214

Merged
JackieTien97 merged 2 commits into
dev/1.3from
fix/aligned-last-query-time-filter-1.3
Jul 15, 2026
Merged

[to dev/1.3] Prevent aligned LAST query from hanging with time filter#18214
JackieTien97 merged 2 commits into
dev/1.3from
fix/aligned-last-query-time-filter-1.3

Conversation

@shuwenwei

@shuwenwei shuwenwei commented Jul 15, 2026

Copy link
Copy Markdown
Member

Description

Fix aligned multi-measurement LAST queries that may hang when a time filter excludes the only remaining chunk after selected-column pruning.

For aligned series, pruning chunks with no values in the selected measurements can leave a singleton chunk whose statistics differ from the time-series metadata statistics. DiskAlignedChunkMetadataLoader previously skipped time filtering when only one chunk remained, allowing an out-of-range chunk to enter the scan state machine without being consumed.

Changes

  • Apply chunk-level time filtering to every non-empty aligned chunk metadata list, including singleton lists.
  • Add an integration test covering a multi-measurement LAST query whose selected measurements only exist outside the query time range.

Testing

  • Added IoTDBAlignedLastQueryWithTimeFilterIT.

@shuwenwei
shuwenwei marked this pull request as ready for review July 15, 2026 06:27
@shuwenwei shuwenwei changed the title [to dev/1.3] Fix aligned LAST query with time filter [to dev/1.3] Prevent aligned LAST query from hanging with time filter Jul 15, 2026
@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.65%. Comparing base (21c9f9d) to head (a3b2619).

Additional details and impacted files
@@              Coverage Diff              @@
##             dev/1.3   #18214      +/-   ##
=============================================
- Coverage      43.66%   43.65%   -0.01%     
  Complexity       198      198              
=============================================
  Files           3633     3633              
  Lines         244008   244008              
  Branches       29786    29786              
=============================================
- Hits          106543   106533      -10     
- Misses        137465   137475      +10     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JackieTien97
JackieTien97 merged commit 6636db4 into dev/1.3 Jul 15, 2026
18 of 19 checks passed
@JackieTien97
JackieTien97 deleted the fix/aligned-last-query-time-filter-1.3 branch July 15, 2026 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants