Caideyipi opened a new pull request, #18953:
URL: https://github.com/apache/iotdb/pull/18953

   ## 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 five 
`AnalyzerTest` errors reported in #18937.
   
   Replace that ineffective override with 
`check_dn_lease_status_interval_ms=9223372036854775807`, the key read by 
`IoTDBDescriptor` and used by `MetadataLeaseManager`. 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 affected 
`AnalyzerTest` methods: all five fail with `MetadataLeaseFencedException`; 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`, and 
`ClusterAuthorityFetcherLeaseTest`: 41 tests, 0 failures, 0 errors, 1 skipped. 
The 28-module reactor passed using:
   
     ```text
     mvn -o -B -ntp -pl iotdb-core/datanode -am 
-Dmaven.compiler.useIncrementalCompilation=false 
-Dtest=AnalyzerTest,MetadataLeaseManagerTest,DataNodeTableCacheLeaseTest,TreeDeviceSchemaCacheManagerLeaseTest,PartitionCacheLeaseTest,ClusterAuthorityFetcherLeaseTest
 -DfailIfNoTests=false -Dsurefire.failIfNoSpecifiedTests=false test
     ```
   
   - Checkstyle and Spotless checks: passed.
   - `git diff --check`: passed.
   
   This PR has:
   
   - [x] been self-reviewed.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to