Skip to content

Fix IoTConsensus V2 metric unbinding#17704

Open
Pengzna wants to merge 1 commit into
apache:masterfrom
Pengzna:codex/fix-consensus-v2-metrics
Open

Fix IoTConsensus V2 metric unbinding#17704
Pengzna wants to merge 1 commit into
apache:masterfrom
Pengzna:codex/fix-consensus-v2-metrics

Conversation

@Pengzna
Copy link
Copy Markdown
Collaborator

@Pengzna Pengzna commented May 18, 2026

Summary

  • Fix IoTConsensusV2ServerMetrics to remove the userWriteStateMachine timer with the same type used during binding.
  • Fix IoTConsensusV2SinkMetrics timer unbinding so connectorEnqueue is removed and connectorTsFileTransfer is not removed twice.

Copilot AI review requested due to automatic review settings May 18, 2026 06:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes metric timer unbinding for IoTConsensus V2 so that timers are removed using the same tag/type values that were used during binding, preventing leaked/incorrectly removed metrics in the metric service.

Changes:

  • Align IoTConsensusV2ServerMetrics stage timer unbinding to remove userWriteStateMachine (matching bind) instead of writeStateMachine.
  • Fix IoTConsensusV2SinkMetrics timer unbinding to remove connectorEnqueue and avoid double-removal of connectorTsFileTransfer.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/consensus/metric/IoTConsensusV2SinkMetrics.java Corrects timer removal tag so the enqueue timer is properly unbound.
iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/pipe/metric/IoTConsensusV2ServerMetrics.java Fixes stage timer unbinding to match the bound timer type for user write state machine.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants