Caideyipi opened a new pull request, #18764:
URL: https://github.com/apache/iotdb/pull/18764
## Description
Backport of #18722 (commit `ce6c1f5f477b2da5b5071890c715c6b6a9652e45`) to
`dev/1.3`.
`PipeDataRegionSinkMetrics` now serializes `bindTo`, `unbindFrom`,
`register`, and `deregister` so a sink task remains present throughout metric
creation and removal. This prevents concurrent deregistration from causing a
null pointer exception while metrics are being bound during DataNode startup.
The source conflict was adapted to the `dev/1.3` connector naming and API;
the regression test uses the branch's existing `getConnectorIndex()` method.
## Verification
- `.\mvnw.cmd --% -pl iotdb-core/datanode spotless:apply
-Ddevelocity.off=true`
- `.\mvnw.cmd --% -pl iotdb-core/datanode
-Dtest=PipeDataRegionSinkMetricsTest test -Ddevelocity.off=true`
- Build succeeded; the targeted test passed in both configured Surefire
executions with 0 failures and 0 errors.
<hr>
This PR has:
- [x] been self-reviewed.
- [x] concurrent read and write
- [x] added unit tests or modified existing tests to cover new code paths,
ensuring the threshold for code coverage.
<hr>
##### Key changed/added classes in this PR
- `PipeDataRegionSinkMetrics`
- `PipeDataRegionSinkMetricsTest`
--
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]