You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Phixsura (via GitHub)" <gi...@apache.org> on 2026/05/18 19:53:33 UTC

[PR] KAFKA-20404: Replace bulk StreamThread atomicity excludes with field-level suppressions [kafka]

Phixsura opened a new pull request, #22320:
URL: https://github.com/apache/kafka/pull/22320

   Removes `StreamThread` from the three class-level bulk Spotbugs exclusions for atomicity warnings (`AT_NONATOMIC_OPERATIONS_ON_SHARED_VARIABLE`, `AT_NONATOMIC_64BIT_PRIMITIVE`, `AT_STALE_THREAD_WRITE_OF_PRIMITIVE`) and replaces them with field level suppressions that name each affected field and carry a one line rationale.
   
   Spotbugs reports 13 warnings against `StreamThread` once the bulk excludes are lifted, all on a small set of bookkeeping fields:
   
   * `now`, `lastPollMs`, `lastLogSummaryMs`, `totalCommittedSinceLastSummary` (64 bit primitive)
   * `numIterations` (non atomic RMW + stale write)
   * `streamsGroupReady` (stale write)
   
   All accesses to these fields are inside methods that run on the StreamThread itself (the run loop and helpers it calls). The only cross thread reader I could find is `currentNumIterations()`, which is `// visible for testing` and is invoked from `StreamThreadTest` after a synchronous `runOnce(...)` on the same test thread, so it does not introduce a real cross thread access.
   
   Each suppression names the specific fields so any future field added to `StreamThread` is not silently swept under the same exclusion.
   
   Verified with `./gradlew streams:spotbugsMain` (clean) and `./gradlew streams:test --tests StreamThreadTest`.
   
   This is the first of a series of PRs for [KAFKA-20404](https://issues.apache.org/jira/browse/KAFKA-20404). Follow up PRs will tackle the remaining classes one at a time.


-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-20404: Replace bulk StreamThread atomicity excludes with field-level suppressions [kafka]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #22320:
URL: https://github.com/apache/kafka/pull/22320#issuecomment-6514083059

   A label of 'needs-attention' was automatically added to this PR in order to raise the
   attention of the committers. Once this issue has been triaged, the `triage` label
   should be removed to prevent this automation from happening again.


-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-20404: Replace bulk StreamThread atomicity excludes with field-level suppressions [kafka]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #22320:
URL: https://github.com/apache/kafka/pull/22320#issuecomment-4540046830

   A label of 'needs-attention' was automatically added to this PR in order to raise the
   attention of the committers. Once this issue has been triaged, the `triage` label
   should be removed to prevent this automation from happening again.


-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-20404: Replace bulk StreamThread atomicity excludes with field-level suppressions [kafka]

Posted by "Phixsura (via GitHub)" <gi...@apache.org>.
Phixsura commented on PR #22320:
URL: https://github.com/apache/kafka/pull/22320#issuecomment-4484800742

   @muralibasani  Thanks for the note on the JIRA. This is the first concrete PR for StreamThread; happy to address any review feedback and keep going one class per PR for the remaining bulk excludes.


-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-20404: Replace bulk StreamThread atomicity excludes with field-level suppressions [kafka]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #22320:
URL: https://github.com/apache/kafka/pull/22320#issuecomment-6307505558

   This PR is being marked as stale since it has not had any activity in 90 days. If you
   would like to keep this PR alive, please leave a comment asking for a review. If the PR has 
   merge conflicts, update it with the latest from the base branch.
   <p>
   If you are having difficulty finding a reviewer, please reach out on the 
   [mailing list](https://kafka.apache.org/contact).
   <p>
   If this PR is no longer valid or desired, please feel free to close it. If no activity
   occurs in the next 30 days, it will be automatically closed.


-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org