Skip to content

Preserve accepted table attribute versions across schema fetches - #19134

Open
Caideyipi wants to merge 3 commits into
apache:masterfrom
Caideyipi:fix/table-attribute-update-ordering-20261105
Open

Caideyipi wants to merge 3 commits into
apache:masterfrom
Caideyipi:fix/table-attribute-update-ordering-20261105

Conversation

@Caideyipi

Copy link
Copy Markdown
Collaborator

Description

A schema fetch registers its SchemaRegion in TableDeviceCacheAttributeGuard using put(), resetting the latest accepted update version. A delayed older batch can then overwrite current attributes, including values written after a column is dropped and re-added.

Register each region with putIfAbsent() so repeated fetches preserve its accepted version. Add a unit test for older, duplicate, and newer update versions, plus an integration test that holds an old batch across column recreation and verifies current attributes remain intact after delivery.

The integration fixture injects transport failures and delays through a Java agent in test sources. It shares cluster startup across compatible cases and exposes extra child-JVM options only in the integration-test launcher.

Validation

  • Clean source build of affected modules and the integration-test dependency closure with JDK 17.
  • TableDeviceCacheAttributeGuardTest: 1 test passed; it fails on the unmodified base.
  • IoTDBAttributeUpdateOrderingIT: 1 test passed in a 1-ConfigNode, 2-DataNode cluster; on the unmodified base the old batch replaces new-lifetime with late-old.
  • Spotless and Checkstyle passed.

Initial independent review is pending; this PR is intentionally a draft.

@Caideyipi

Copy link
Copy Markdown
Collaborator Author

Self-review of PR 19134 found no actionable implementation or test-logic issues. The delayed-batch scenario passed against the PR source in the full reactor.

I removed the direct ASM dependency from integration-test/pom.xml. ASM 9.3 remains available through integration-test -> iotdb-server; dependency resolution and the regression test both succeeded without the direct declaration.

Verification on JDK 17: Spotless passed; a clean source reactor build covered 37 modules and TableDeviceCacheAttributeGuardTest passed (1/1); the TableClusterIT reactor run passed IoTDBAttributeUpdateOrderingIT (1/1, no failures or errors). Maven build caches were disabled.

Reviewed revision: a6323b8685b444b2353ae8737a8e9881ff18edf6. Final commit and PR head: 6b5d8ca0be623b2da96f2fb6ae5fcf5bb356b535. CI on the final head is still running; I did not wait for it.

@Caideyipi
Caideyipi marked this pull request as ready for review November 5, 2026 08:50
…r-sync-20261106

# Conflicts:
#	integration-test/src/test/java/org/apache/iotdb/relational/it/schema/TableMetadataPropagationTestBase.java
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