Skip to content

[To dev/1.3] Fix schema alias validation and deletion performance (#18861) - #18871

Merged
jt2594838 merged 1 commit into
apache:dev/1.3from
Caideyipi:cp-a498d7d2-dev-1.3
Oct 15, 2026
Merged

jt2594838 merged 1 commit into
apache:dev/1.3from
Caideyipi:cp-a498d7d2-dev-1.3

Conversation

@Caideyipi

Copy link
Copy Markdown
Collaborator

Description

Backport of #18861 (a498d7d2a4608993c5c7d0c11f954e77b0554900) to dev/1.3.

Validate the shared measurement/alias namespace before aligned batch creation or merge in both Memory and PBTree schema engines. This rejects duplicate aliases and aliases that collide with another measurement before any schema mutation.

Maintain direct measurement and non-view child counts so in-memory timeseries deletion avoids rescanning all children for each measurement. Include the counters in memory accounting and preserve cleanup behavior for nested devices, snapshots and logical views.

Backport adaptations

  • Omit the table-model blacklist and device attribute store changes and their tests because those components do not exist in 1.3.
  • Adapt the regression tests to the 1.3 timeseries method names and snapshot callback signature.

Validation

  • mvn spotless:apply -pl iotdb-core/datanode
  • mvn test -pl iotdb-core/datanode -am -Dtest=MTreeBelowSGMemoryImplTest,SchemaRegionAliasAndTagTest -Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=false — 45 tests passed, including all four Schema Engine test configurations.
  • mvn test-compile -DskipTests
  • mvn test-compile -P with-zh-locale -DskipTests

This PR has:

  • been self-reviewed.
  • added comments explaining the intent of the code.
  • added regression tests for alias validation, deletion and snapshot recovery.

…pache#18861)

* Fix schema mutation validation, accounting and deletion performance

Validate aligned batch aliases, keep blacklist statistics idempotent, avoid repeated child scans during deletion, and correct and reuse device attribute storage. Add regression coverage for retries, snapshots, nested devices and all schema engine modes.

* Fix aligned memchunk tests for current API

(cherry picked from commit a498d7d)
@jt2594838
jt2594838 merged commit f6b122c into apache:dev/1.3 Oct 15, 2026
15 of 16 checks passed
@jt2594838
jt2594838 deleted the cp-a498d7d2-dev-1.3 branch October 15, 2026 02:35
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