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: avoid infinite hang when closing Kakfa writer #2498

Merged
merged 1 commit into from
Mar 11, 2021

Conversation

danxmoran
Copy link
Contributor

Fixes #2497


// Update the config in a way that requires shutting down all active writers.
c.UseSSL = true
require.NoError(t, cluster.Update(c))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Without the changes in service.go, this test never completes.

@@ -71,6 +75,7 @@ func (w *writer) Open() {
statsMap.Set(statWriteMessageCount, writeMessages)

w.ticker = time.NewTicker(time.Second)
w.tickerDone = make(chan struct{}, 1)
Copy link
Contributor

Choose a reason for hiding this comment

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

this doesn't need to have a 1) since its only ever used by closing. It isn't that big a deal though.

@danxmoran danxmoran merged commit 4977065 into master Mar 11, 2021
@danxmoran danxmoran deleted the dm-kafka-close-no-hang-2497 branch March 11, 2021 19:45
alespour pushed a commit to bonitoo-io/kapacitor that referenced this pull request Mar 24, 2021
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.

Closing a Kafka writer hangs
2 participants