Skip to content

Increase Edge metadata lease timeout to ten years - #19165

Open
JackieTien97 wants to merge 1 commit into
masterfrom
ty/edge-long-metadata-lease
Open

JackieTien97 wants to merge 1 commit into
masterfrom
ty/edge-long-metadata-lease

Conversation

@JackieTien97

Copy link
Copy Markdown
Contributor

Description

Long JVM pauses can exceed Edge's default 20-second metadata lease and trigger DataNode cache fencing and recovery even though ConfigNode and DataNode share the same JVM. Set the Edge default metadata_lease_fence_ms to 315360000000 (ten 365-day years) to effectively disable lease expiry for the combined process.

The finite value leaves headroom for the ConfigNode's five-second margin and conversion to nanoseconds. It also extends the ConfigNode's cache-invalidation wait when a service is unreachable. The standard deployment default remains 20 seconds.

Validation

  • mvn clean package -DskipTests -pl distribution -am — passed.
  • mvn verify -Drat.skip=true -DskipUTs -Dit.test=IoTDBEdgeBasicIT -DfailIfNoTests=false -Dfailsafe.failIfNoSpecifiedTests=false -pl integration-test -am -P EdgeIT -P with-integration-tests — 7 tests passed, none failed or skipped; startup, Tree/Table reads and writes, concurrent queries, and shutdown verified using the generated Edge package.
  • Checked the generated archives and SHA-512 checksums; the long lease is present only in the Edge configuration.
  • Checked that adding the ConfigNode margin and converting the timeout to nanoseconds fit in a signed long.

The initial integration-test invocation was blocked by RAT scanning seven pre-existing, untracked local files. The successful run skipped RAT; those files are not included in this PR.

This PR has:

  • been self-reviewed.
  • added comments explaining the configuration's purpose and finite value.
  • been tested with a local Edge instance.

@sonarqubecloud

sonarqubecloud Bot commented Nov 6, 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

@codecov

codecov Bot commented Nov 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 48.53%. Comparing base (1512190) to head (8768a63).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #19165      +/-   ##
============================================
- Coverage     48.53%   48.53%   -0.01%     
  Complexity      635      635              
============================================
  Files          5573     5573              
  Lines        412215   412284      +69     
  Branches      54338    54350      +12     
============================================
+ Hits         200062   200084      +22     
- Misses       212153   212200      +47     

☔ 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.

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