Skip to content

[Fix] Address IoTConsensus retry path Sonar issues - #18373

Open
Caideyipi wants to merge 1 commit into
apache:masterfrom
Caideyipi:fix/iot-consensus-sonar
Open

[Fix] Address IoTConsensus retry path Sonar issues#18373
Caideyipi wants to merge 1 commit into
apache:masterfrom
Caideyipi:fix/iot-consensus-sonar

Conversation

@Caideyipi

Copy link
Copy Markdown
Collaborator

Description

This is a follow-up to #18323. Sonar reported three issues in the lock-protected SyncLog ordering and retry path.

This PR:

  • documents and narrowly suppresses the cognitive/brain-method warnings on the stateful queue path;
  • introduces a short local alias for the generated i18n message constant so the retry response no longer exceeds the line-length limit.

The request ordering and retry behavior are unchanged.

Verification

  • ReplicateTest#syncLogWriteProcessErrorRetryPreservesRequestOrderTest: passed
  • ReplicateTest#syncLogWriteProcessErrorTriggersLeaderRetryTest: passed
  • Consensus compilation with the default and Chinese locales: passed
  • Checkstyle: 0 violations
  • Spotless and git diff --check: passed

This PR has:

  • been self-reviewed.
  • added a comment explaining the targeted Sonar suppression.
  • been covered by the existing retry-order regression tests.

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