Repository navigation
Conversation
| .recordPipeResourceFailure(event.getPipeName(), event.getCreationTime(), failureType); | ||
| } | ||
|
|
||
| public String getDisplayTaskID() { |
There was a problem hiding this comment.
major iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/task/subtask/sink/PipeSinkSubtask.java:688 — getDisplayTaskID() is never wired into error output; new test fails and raw taskID still leaks attributes
PipeSinkSubtask.getDisplayTaskID() is dead code: PipeAbstractSinkSubtask.handleException (line 370) and transferHeartbeatEvent still format the raw taskID, which embeds attributeSortedString (e.g. sink.password=..., sink.token=...). testTransferExceptionUsesDisplayTaskID (PipeSinkSubtaskTest:187) asserts the message contains "Exception in pipe transfer, subtask: sink_", so it fails at head while credentials remain in pipe exception messages.
Fix: Backport the node-commons part: add an overridable getDisplayTaskID() on PipeAbstractSinkSubtask and use it in handleException and transferHeartbeatEvent instead of taskID.
There was a problem hiding this comment.
Confirmed and fixed. PipeAbstractSinkSubtask.handleException() uses getDisplayTaskID(), and heartbeat connector failures now use the same sanitized ID. Added testHeartbeatTransferExceptionUsesDisplayTaskID, which checks the exception cause chain; the focused suite passes (23 tests).
|
|
||
| Assert.assertFalse(displayString.contains("plain-text-password")); | ||
| Assert.assertFalse(displayString.contains("plain-text-connector-password")); | ||
| Assert.assertFalse(displayString.contains("plain-text-key-store-password")); |
There was a problem hiding this comment.
major iotdb-core/datanode/src/test/java/org/apache/iotdb/db/pipe/agent/task/subtask/sink/PipeSinkSubtaskManagerTest.java:159 — testGenerateAttributeDisplayStringHidesSensitiveAttributes fails: ssl.key-store-pwd is not a hidden key
PipeParameters.ValueHider.KEYS contains only "ssl.trust-store-pwd" and "password", so generateAttributeDisplayString emits "{sink.ssl.key-store-pwd=plain-text-key-store-password, sink.user=root}". The new assertions at line 159 (no "plain-text-key-store-password") and line 162 (no "sink.ssl.key-store-pwd") therefore fail.
Fix: Add "ssl.key-store-pwd" to ValueHider.KEYS, or change the test to use sink.ssl.trust-store-pwd, which is the only SSL password key IoTDB actually hides.
There was a problem hiding this comment.
Confirmed: ssl.key-store-pwd is included in the hidden-key set, and key matching is case-normalized. testGenerateAttributeDisplayStringHidesSensitiveAttributes asserts neither the key nor its plaintext value is displayed; the focused suite passes (23 tests).
|
Fixed the two failing Windows DataNode tests:
Verification: Spotless passed, and the focused DataNode test run passed (22 tests, 0 failures). Failure analyzed at PR head |
|
minor close() logs the raw taskID at INFO (387, 394), and discardPendingEventsOfPipeUnderLock (361), the "PipeSinkSubtaskClose-" thread name (433) and the close-timeout warn (454) do the same. taskID embeds attributeSortedString (e.g. sink.password=..., sink.token=...), so every sink subtask close writes plaintext credentials to datanode.log; the same PR removed that raw string from PipeSinkSubtaskManager's register log. Fix: Replace taskID with getDisplayTaskID() in these LOGGER calls and in the "PipeSinkSubtaskClose-" thread name, matching the upstream commit. |
|
@luoluoyuyu Fixed. Close success/failure logs, pending-event discard warnings, the close-thread name, and the timeout warning now use |
|
Follow-up summary:
|
|
minor deregister (361), markTabletEvent (378) and markTsFileEvent (392) log the raw taskID, as do PipeSchemaRegionSinkMetrics.deregister (187) and markSchemaEvent (205). taskID = pipeName + "" + attributeSortedString + "" + creationTime + "_" + index, so it embeds sink.password/sink.token in plaintext. Trigger: MetricService.restartService() calls unbindFrom, which deregisters every entry from connectorMap, so later subtask close() hits the warn branch and every event hits the INFO branch, writing credentials to datanode.log. Fix: Log a sanitized identifier (e.g. getMetricName() plus pipe/region tags) instead of the raw taskID in these branches, keeping taskID only as the internal map key. |
|
@luoluoyuyu Fixed in |
|
Review update for head
|
|
major onReportEventFailure (116, 130, 141, 154, 171) and onNonReportEventFailure (187, 198, 209) log the raw taskID at WARN. For sink subtasks taskID = pipeName_{...sink.password=<plaintext>...}_creationTime_index, so every sink transfer failure and every locally-retried connection error (PipeAbstractSinkSubtask.onFailure -> super.onFailure) writes credentials to datanode.log; PipeSubtask.onSuccess:119 logs it again after a successful retry. Fix: Add a public getDisplayTaskID() on PipeSubtask (default getTaskID) and log it here and in PipeSubtask.onSuccess instead of taskID, as done on master. |
|
minor start() logs "The subtask {} is started to submit self." (138) and deregister() logs "The subtask {} is closed successfully." / the close error (161, 163) with the raw subTaskID. PipeSinkSubtaskLifeCycle passes subtask.getTaskID(), which embeds attributeSortedString (sink.password/sink.token), so every sink subtask start and close writes plaintext credentials at INFO to datanode.log, immediately after the now-sanitized PipeSinkSubtask.close() log. Fix: Log the subtask display ID (e.g. subtask.getDisplayTaskID(), exposing it publicly on PipeSubtask) instead of the raw subTaskID in register/start/stop/deregister. |
Backports commit
21612f0e61f98cd5c6c77b3dd89270f5f09b2776todev/1.3.This change keeps sink metric names and tags independent of connector attributes, sanitizes sink subtask display IDs and error output, and adds regression coverage for hidden attributes and subscription sink metric names.