OCPBUGS-105877: [release-4.22] Fix duplicate TriggerLogs calls on multi-process - #732
Conversation
Each daemon-side ptp4l/phc2sys process opens its own socket connection to CEP. The listenToSocket accept loop spawns a separate processMessages goroutine per connection, and each one unconditionally called TriggerLogs(), which hits the daemon's /emit-logs endpoint. With N processes this caused N replay cycles of the stale portRole cache, interleaving stale port-state events with live data and preventing the system from reaching LOCKED state for several minutes. Gate TriggerLogs with sync.Once so only the first accepted connection triggers the replay. The Once resets naturally when CEP restarts via syscall.Exec. Generated-by: Cursor
Addresses CodeRabbit review: read the package-level eventManager into a local variable so the goroutine closure captures the checked value rather than re-reading the global. Generated-by: Cursor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@nocturnalastro: This pull request references Jira Issue OCPBUGS-105877, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nocturnalastro, vitus133 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/jira refresh |
|
@nocturnalastro: This pull request references Jira Issue OCPBUGS-105877, which is valid. The bug has been moved to the POST state. 7 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Jira (bblock@redhat.com), skipping review request. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
Manual cherry-pick of #727