Repository navigation
[Test] Fix the metadata lease override in DataNode unit tests - #18953
Merged
jt2594838 merged 1 commit intoOct 21, 2026
Merged
Conversation
Use the DataNode check interval instead of the ConfigNode fence threshold so unit tests without ConfigNode heartbeats do not fence shared metadata caches after 20 seconds.
Contributor
|
looks good to me |
VGalaxies
pushed a commit
to VGalaxies/iotdb
that referenced
this pull request
Oct 26, 2026
…#18953) Use the DataNode check interval instead of the ConfigNode fence threshold so unit tests without ConfigNode heartbeats do not fence shared metadata caches after 20 seconds.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The shared DataNode unit-test configuration sets
metadata_lease_fence_ms, which is read only by ConfigNode. DataNode therefore keeps its default 500 ms lease check interval and fences its metadata caches after 20 seconds without ConfigNode heartbeats. This reproduces on current master and causes the fiveAnalyzerTesterrors reported in #18937.Replace that ineffective override with
check_dn_lease_status_interval_ms=9223372036854775807, the key read byIoTDBDescriptorand used byMetadataLeaseManager. This restores the intent of #18284 in the shared unit-test configuration. Lease-specific tests continue to exercise expiry using independent managers and injected clocks.Validation
On unmodified master (
9ffa89327f8), initialize the singleton lease manager, wait 21.5 seconds without heartbeats, then run the five affectedAnalyzerTestmethods: all five fail withMetadataLeaseFencedException; the effective check interval is still 500 ms.Repeat the same delayed probe with this one-line change: all five pass and the singleton remains unfenced; the effective check interval is
Long.MAX_VALUE.AnalyzerTest,MetadataLeaseManagerTest,DataNodeTableCacheLeaseTest,TreeDeviceSchemaCacheManagerLeaseTest,PartitionCacheLeaseTest, andClusterAuthorityFetcherLeaseTest: 41 tests, 0 failures, 0 errors, 1 skipped. The 28-module reactor passed using:Checkstyle and Spotless checks: passed.
git diff --check: passed.This PR has: