Skip to content

Improve metadata OOM diagnostics#18039

Merged
jt2594838 merged 2 commits into
masterfrom
improve-metadata-oom-diagnostics
Jul 6, 2026
Merged

Improve metadata OOM diagnostics#18039
jt2594838 merged 2 commits into
masterfrom
improve-metadata-oom-diagnostics

Conversation

@Caideyipi

Copy link
Copy Markdown
Collaborator

Description

This PR improves metadata/query-analysis OOM diagnostics when result-set column expansion or schema fetch runs out of memory.

Changes:

  • Track matched, expanded, generated, and schema-fetch deserialized result columns in MPPQueryContext.
  • Enrich MemoryNotEnoughException during metadata analysis with column counts, SLIMIT/SOFFSET, ALIGN BY DEVICE guidance, memory shortage, and estimated exceeded columns.
  • Record column counts during expression expansion and schema fetch batch deserialization.
  • Add MPPQueryContextTest coverage for enriched result-column and schema-fetch OOM messages, plus the no-context fallback path.

Verification

  • mvn spotless:apply -pl iotdb-core/datanode
  • git diff --check
  • mvn "-Ddevelocity.off=true" test -pl iotdb-core/datanode -Dtest=MPPQueryContextTest currently fails before running tests during datanode main-source compilation because of pre-existing/unrelated missing symbols in AstBuilder, DataNodeMemoryConfig, TableConfigTaskVisitor, DatasetHeaderFactory, ShowCreate*Task, and DataRegionConsensusImpl.

@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.15736% with 45 lines in your changes missing coverage. Please review.
✅ Project coverage is 41.70%. Comparing base (7f41f06) to head (9fa3066).
⚠️ Report is 32 commits behind head on master.

Files with missing lines Patch % Lines
...e/iotdb/db/queryengine/common/MPPQueryContext.java 78.53% 38 Missing ⚠️
...lan/analyze/schema/ClusterSchemaFetchExecutor.java 0.00% 6 Missing ⚠️
...eryengine/common/schematree/ClusterSchemaTree.java 75.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #18039      +/-   ##
============================================
+ Coverage     41.42%   41.70%   +0.27%     
  Complexity      318      318              
============================================
  Files          5282     5296      +14     
  Lines        369246   372014    +2768     
  Branches      47786    48128     +342     
============================================
+ Hits         152978   155165    +2187     
- Misses       216268   216849     +581     

☔ 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.

@sonarqubecloud

sonarqubecloud Bot commented Jul 3, 2026

Copy link
Copy Markdown

@jt2594838 jt2594838 merged commit 9dd1bb8 into master Jul 6, 2026
42 of 46 checks passed
@jt2594838 jt2594838 deleted the improve-metadata-oom-diagnostics branch July 6, 2026 02:16
jt2594838 pushed a commit that referenced this pull request Jul 8, 2026
* Improve metadata OOM diagnostics

* Internationalize metadata OOM diagnostics
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