Skip to content

Fix table TTL reset propagation to DataNodes - #19110

Draft
Caideyipi wants to merge 2 commits into
masterfrom
fix/table-ttl-default-propagation
Draft

Caideyipi wants to merge 2 commits into
masterfrom
fix/table-ttl-default-propagation

Conversation

@Caideyipi

@Caideyipi Caideyipi commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Resetting a table TTL with ALTER TABLE ... SET PROPERTIES ttl=DEFAULT can leave DataNodes enforcing an infinite TTL while ConfigNode reports the finite database default. For example, after resetting a table to a one-day database TTL, SHOW TABLES reports one day but queries still return two-day-old rows.

Resolve the database default before filtering unchanged properties and constructing the table snapshot sent to DataNodes. Prepare the snapshot on a detached table copy so that checking a property update does not mutate consensus-owned metadata before the persistence plan runs. Unset/infinite defaults and unchanged effective TTLs retain their existing behavior.

Add unit and integration coverage for finite, unset, and infinite defaults, unchanged original metadata, persisted/pre-release snapshot consistency, expired reads, expired-write rejection through every DataNode, explicit table overrides, and resetting back to infinite TTL. Give the existing Pipe metadata synchronization test a one-day database TTL so rows remain valid after DEFAULT is actually enforced.

Validation

  • Formatting and IT selection checks passed.
  • The TTL regression test reproduced the stale DataNode behavior on the previous implementation in TableClusterIT.
  • Clean-source targeted unit tests passed: 13 tests, no failures, errors, or skips.
  • The TTL regression passed in both TableClusterIT (1 ConfigNode / 3 DataNodes) and TableSimpleIT (1 ConfigNode / 1 DataNode). The affected Pipe metadata synchronization test passed in MultiClusterIT2DualTableManualEnhanced with both clusters in HighPerformanceMode.
  • All targeted validation used clean source at d6a8447b0872755be8c6c761dc7069b5c6381680; Maven exited successfully and reports confirmed no failures, errors, or skipped tests. Full GitHub CI is still in progress.
  • Independent review is pending; this PR is intentionally a draft.

@Caideyipi
Caideyipi force-pushed the fix/table-ttl-default-propagation branch 3 times, most recently from 8b42879 to 4870683 Compare November 4, 2026 02:49
@Caideyipi
Caideyipi force-pushed the fix/table-ttl-default-propagation branch from 4870683 to d6a8447 Compare November 4, 2026 02:56
@codecov

codecov Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.32%. Comparing base (2fd7d83) to head (295c34f).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
...onfignode/manager/schema/ClusterSchemaManager.java 88.23% 2 Missing ⚠️
...impl/schema/table/SetTablePropertiesProcedure.java 87.50% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #19110      +/-   ##
============================================
+ Coverage     48.22%   48.32%   +0.09%     
  Complexity      625      625              
============================================
  Files          5572     5572              
  Lines        411672   411783     +111     
  Branches      54225    54255      +30     
============================================
+ Hits         198547   198983     +436     
+ Misses       213125   212800     -325     

☔ 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 Nov 4, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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.

1 participant