Skip to content

Delay VTGateConnection closure when rotating connections#4141

Merged
sougou merged 5 commits intovitessio:masterfrom
HubSpot:delay-channel-closure
Aug 22, 2018
Merged

Delay VTGateConnection closure when rotating connections#4141
sougou merged 5 commits intovitessio:masterfrom
HubSpot:delay-channel-closure

Conversation

@leoxlin
Copy link
Copy Markdown

@leoxlin leoxlin commented Aug 16, 2018

At HubSpot we see a lot high volume applications take a lot of impact during channel rotations due to a race condition that will provide a shutdown channel to the VitessStatement and VitessPreparedStatement when the certificate rotator thread closes the VTGateConnection

This PR adds a more graceful way to handle refresh channel closures by adding a strategy to delay closure of the connection to a later time.

This will reduce the pain on any currently running transactions as well as any stream calls that had not completed when the rotation happens.

@acharis @harshit-gangal

Leo Xuzhang Lin added 4 commits August 16, 2018 13:34
Signed-off-by: Leo Xuzhang Lin <llin@hubspot.com>
Signed-off-by: Leo Xuzhang Lin <llin@hubspot.com>
Signed-off-by: Leo Xuzhang Lin <llin@hubspot.com>
Signed-off-by: Leo Xuzhang Lin <llin@hubspot.com>
@leoxlin leoxlin changed the title Delay channel closure Delay VTGateConnection closure when rotating connections Aug 16, 2018
Signed-off-by: Leo Xuzhang Lin <llin@hubspot.com>
@leoxlin leoxlin force-pushed the delay-channel-closure branch from 77a73d6 to f0517ca Compare August 16, 2018 19:55
@harshit-gangal harshit-gangal self-requested a review August 20, 2018 10:03
@harshit-gangal
Copy link
Copy Markdown
Member

I will look into this week.

@sougou sougou merged commit 620e05c into vitessio:master Aug 22, 2018
@leoxlin leoxlin deleted the delay-channel-closure branch October 30, 2018 03:06
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.

3 participants