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

Implement zero downtime reconnects for workers draining #79

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

BrunoScheufler
Copy link
Contributor

No description provided.

When using the same goroutine to handle channel selects and sending to an unbuffered channel, there's no way for the channel receive to work.

This is fixed by not using a channel for control flow from error group to error group. This way, the same goroutine can be used.
@BrunoScheufler BrunoScheufler self-assigned this Nov 22, 2024
Copy link

linear bot commented Nov 22, 2024

config := sdk.RegisterRequest{
URL: fmt.Sprintf("%s://%s%s", scheme, host, pathAndParams),
V: "1",
DeployType: deployType,
DeployType: sdk.DeployTypePing,
Copy link
Contributor

@darwin67 darwin67 Nov 22, 2024

Choose a reason for hiding this comment

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

why just ping now and not use the connect type?

notifyConnectedChan := make(chan struct{})

// Channel to imperatively initiate a connection
initiateConnectionChan := make(chan struct{})
Copy link
Contributor

Choose a reason for hiding this comment

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

why not make these channels part of the connectHandler instead of passing them around?

looks like it can be all done with a NewConnectHandler function.

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