Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(kuma-cp): make store changes processing more reliable (backport of #6728) #6763

Merged
merged 2 commits into from
May 16, 2023

Conversation

kumahq[bot]
Copy link
Contributor

@kumahq kumahq bot commented May 15, 2023

Automatic cherry-pick of #6728 for branch release-2.0

Generated by action

cherry-picked commit c0953ae
⚠️ ⚠️ ⚠️ Conflicts happened when cherry-picking! ⚠️ ⚠️ ⚠️

On branch release-2.0
Your branch is up to date with 'origin/release-2.0'.

You are currently cherry-picking commit c0953aefb.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   pkg/events/eventbus.go
	modified:   pkg/events/interfaces.go
	modified:   pkg/insights/resyncer.go
	modified:   pkg/insights/test/test_event_reader.go

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	both modified:   pkg/kds/global/components.go
	both modified:   pkg/plugins/common/postgres/listener.go
	deleted by us:   pkg/plugins/common/postgres/pgx_listener.go
	deleted by us:   pkg/plugins/common/postgres/pq_listener.go
	both modified:   pkg/plugins/resources/postgres/events/listener.go
	deleted by us:   pkg/plugins/resources/postgres/listener_test.go

When running deployment with postgres/etcd we are using EventBus which is responsible for sending database events to mesh-insight-resyncer component. In case of a problem with the connection to the database, mesh-insight-resyncer component is closed and restarted by ResilientComponent. On each restart, we are subscribing to the event bus, but we are not removing the old subscription. That caused the issue in which we were sending events to the subscriber that didn't exist at that time. Because we are sending it and no one is listing it, the component was hanging and events were not propagated to other subscribers.

Signed-off-by: Lukasz Dziedziak <lukidzi@gmail.com>
@kumahq kumahq bot requested a review from a team May 15, 2023 15:30
@kumahq kumahq bot added the conflict label May 15, 2023
@kumahq kumahq bot removed the request for review from a team May 15, 2023 15:30
@kumahq kumahq bot added the release-2.0 label May 15, 2023
@kumahq kumahq bot requested review from michaelbeaumont and bartsmykla May 15, 2023 15:30
Signed-off-by: Lukasz Dziedziak <lukidzi@gmail.com>
@lukidzi lukidzi merged commit 961b3da into release-2.0 May 16, 2023
@lukidzi lukidzi deleted the chore/backport-release-2.0-6728 branch May 16, 2023 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant