Skip to content

[Fix] Keep heartbeat alive when metadata lease is fenced - #18343

Open
Caideyipi wants to merge 2 commits into
masterfrom
fix/heartbeat-metadata-lease-fence
Open

[Fix] Keep heartbeat alive when metadata lease is fenced#18343
Caideyipi wants to merge 2 commits into
masterfrom
fix/heartbeat-metadata-lease-fence

Conversation

@Caideyipi

@Caideyipi Caideyipi commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Description

  • build schema quota count maps on snapshots and publish them to the heartbeat response only after both device and series counts succeed
  • catch MetadataLeaseFencedException while collecting schema counts so the DataNode heartbeat can still complete
  • omit both region device and series usage maps after this failure, preventing ConfigNode from applying partial schema count updates
  • emit a localized warning and add regression coverage for both method-level atomicity and the fenced-heartbeat path

Tests

  • mvn -nsu test -pl iotdb-core/datanode -Dtest=DataNodeInternalRPCServiceImplTest#testHeartbeatSkipsSchemaUsageWhenMetadataLeaseIsFenced
  • mvn -o -nsu test-compile -pl iotdb-core/datanode -P with-zh-locale -DskipTests

@Caideyipi
Caideyipi force-pushed the fix/heartbeat-metadata-lease-fence branch from a7734ac to 7dc9d05 Compare July 29, 2026 03:47
@sonarqubecloud

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