Skip to content

[Performance] Restore aligned memtable flush fast path - #18406

Merged
jt2594838 merged 1 commit into
masterfrom
fix/aligned-flush-fast-path
Aug 6, 2026
Merged

[Performance] Restore aligned memtable flush fast path#18406
jt2594838 merged 1 commit into
masterfrom
fix/aligned-flush-fast-path

Conversation

@Caideyipi

Copy link
Copy Markdown
Collaborator

Description

The aligned memtable flush fix in f87c9c3e80c introduced active-column mapping into the common path even when no measurement was deleted. Wide aligned batches then pay for Integer column mappings and additional per-point branches during encoding.

This change keeps the deleted-measurement encoding path unchanged and dispatches to the pre-f87c9c3 tight loop only when the active schema is the original schema. Flushing memtables are immutable, so the identity check is stable throughout encoding.

Two focused unit tests verify that:

  • flushes without deleted measurements skip column mapping;
  • flushes with deleted measurements still use the existing mapped path.

Tests

  • mvn spotless:apply -pl iotdb-core/datanode
  • mvn test -pl iotdb-core/datanode -Dtest=MemTableFlushTaskTest
    • Tests run: 5, Failures: 0, Errors: 0, Skipped: 0
  • The targeted IoTDBPipeReceiverAutoCreateDisabledIT method was attempted locally, but the test cluster failed in setUp because ConfigNode did not become reachable. The test body was not entered; the failure is unrelated to this change.

@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.27273% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 43.33%. Comparing base (f493700) to head (9fee974).

Files with missing lines Patch % Lines
...e/dataregion/memtable/AlignedWritableMemChunk.java 77.27% 20 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #18406      +/-   ##
============================================
- Coverage     43.50%   43.33%   -0.17%     
  Complexity      374      374              
============================================
  Files          5395     5395              
  Lines        385520   385608      +88     
  Branches      50160    50185      +25     
============================================
- Hits         167715   167114     -601     
- Misses       217805   218494     +689     

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

@jt2594838
jt2594838 merged commit 0d94b76 into master Aug 6, 2026
40 of 42 checks passed
@jt2594838
jt2594838 deleted the fix/aligned-flush-fast-path branch August 6, 2026 10:58
jt2594838 pushed a commit that referenced this pull request Aug 7, 2026
…ents (#18416)

* Optimize aligned memtable flush without deleted measurements (#18406)

* Fix dev 1.3 aligned memtable flush backport
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