Skip to content

[Pipe] Prevent receiver statement exception log floods - #18318

Open
Caideyipi wants to merge 1 commit into
apache:masterfrom
Caideyipi:fix/pipe-receiver-log-flood
Open

[Pipe] Prevent receiver statement exception log floods#18318
Caideyipi wants to merge 1 commit into
apache:masterfrom
Caideyipi:fix/pipe-receiver-log-flood

Conversation

@Caideyipi

Copy link
Copy Markdown
Collaborator

Description

The pipe receiver periodically reduces repeated statement exception logs, but the current reducer key contains the receiver id, the full statement logging string, and the exception message. For high-cardinality insert traffic, these fields make otherwise identical failures unique and allow stack traces to flood the log.

This PR:

  • reduces statement exceptions by statement class, root-cause class, and the root cause's first stack frame;
  • ignores receiver ids, statement payloads, and dynamic exception messages in the reducer key, while keeping different failure locations independently visible;
  • adds a compact Pipe logging string for InsertRowsStatement that reports the row count and first/last row summaries without serializing all row values.

The underlying statement exception or NPE is intentionally unchanged; this PR only prevents repeated failures from producing unbounded logs and bounds the size of the remaining InsertRowsStatement entries.

Tests

  • mvn spotless:apply -pl iotdb-core/datanode
  • mvn test -pl iotdb-core/datanode -Dtest=IoTDBDataNodeReceiverTest
  • mvn test-compile -pl iotdb-core/datanode -P with-zh-locale -DskipTests
  • verified English and Chinese DataNodePipeMessages key parity

This PR has:

  • been self-reviewed.
  • added comments explaining the intent of the reducer key.
  • added or updated unit tests for the new behavior.

Key changed/added classes
  • IoTDBDataNodeReceiver
  • InsertRowsStatement
  • IoTDBDataNodeReceiverTest

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