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 leaky goroutines in matching #5499

Conversation

3vilhamster
Copy link
Contributor

What changed?
Fixed matching taskReader stop not waiting for stopping underlying dispatchers.

Why?
With recent logging changes this leaks produces:

Log in goroutine after TestIntegrationSuite has completed: 2023-12-19T00:11:34.305Z

How did you test it?
Run integration tests

Potential risks

Release notes

Documentation Changes

@3vilhamster 3vilhamster force-pushed the fix-leaky-goroutines-in-matching branch from 3741401 to b9cb50c Compare December 19, 2023 12:00
@@ -31,6 +31,7 @@ import (
"github.com/pborman/uuid"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

Copy link
Member

Choose a reason for hiding this comment

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

this is most probably because of Go 1.21 != CI (1.20)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Lets address this after @Groxx PR. Then everything will be unified.

Comment on lines +157 to +158
tr.stopWg.Add(1)
defer tr.stopWg.Done()
Copy link
Member

Choose a reason for hiding this comment

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

Looks like a generic approach for stopping. I wonder if it's possible to have some OOP around this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OOP in Go is hard, I'm not aware of generic solutions on this.

@3vilhamster 3vilhamster merged commit b8b3bdc into cadence-workflow:master Dec 19, 2023
16 checks passed
@3vilhamster 3vilhamster deleted the fix-leaky-goroutines-in-matching branch December 19, 2023 12:28
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