Skip to content

APIGOV-32465 - Fix to avoid deadlocks on watch request and event channel#1026

Merged
vivekschauhan merged 12 commits intomainfrom
APIGOV-32465
Apr 27, 2026
Merged

APIGOV-32465 - Fix to avoid deadlocks on watch request and event channel#1026
vivekschauhan merged 12 commits intomainfrom
APIGOV-32465

Conversation

@vivekschauhan
Copy link
Copy Markdown
Collaborator

No description provided.

@vivekschauhan vivekschauhan marked this pull request as ready for review April 24, 2026 21:04

// RegisterWatch registers a watch topic for polling events and publishing events on a channel
func (m *pollExecutor) RegisterWatch(eventChan chan *proto.Event, errChan chan error) {
func (m *pollExecutor) RegisterWatch(eventChan chan *proto.Event) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

love how this func was simplified

Comment thread pkg/watchmanager/manager.go Outdated
jcollins-axway
jcollins-axway previously approved these changes Apr 24, 2026
@vivekschauhan vivekschauhan merged commit 13f175d into main Apr 27, 2026
2 checks passed
@vivekschauhan vivekschauhan deleted the APIGOV-32465 branch April 27, 2026 19:55
jcollins-axway pushed a commit that referenced this pull request Apr 30, 2026
…nel (#1026)

* APIGOV-32465 - Fix to avoid deadlocks on watch request and event channel

* APIGOV-32465 - initial watch request lock wait using the context

* APIGOV-32465 - fix race on watch context cancel and writing error to channel

* APIGOV-32465 - fix race on writing watch request during registration and healthcheck failure

* APIGOV-32465 - return error when stream is not initialized for healthcheck

* APIGOV-32465 - timeout on initial watch request

* APIGOV-32465 - do not remove clients while checking status

* APIGOV-32465 - defer setting isInitialized after setting to true

* APIGOV-32465 - fix test

* APIGOV-32465 - data race and lock issues on jobs
- Fixes from Jason to remove mutex and logging updates
- Fix race in healthchecker
- Fix deadlock on interval job when marking it as stopped
- Added/updated tests for watch manager

* APIGOV-32465 - Refactoring to replace error channel with context cancellation for RegisterWatch

* APIGOV-32465 - review fix
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.

2 participants