Skip to content

vttablet: fix panic in NewDBConnNoPool#6086

Merged
harshit-gangal merged 1 commit intovitessio:masterfrom
planetscale:ss-exporter-panic
Apr 18, 2020
Merged

vttablet: fix panic in NewDBConnNoPool#6086
harshit-gangal merged 1 commit intovitessio:masterfrom
planetscale:ss-exporter-panic

Conversation

@sougou
Copy link
Copy Markdown
Contributor

@sougou sougou commented Apr 17, 2020

Fixes #6084.

The last exporter change introduced a regression due to NewDBConnNoPool
creating a tabletenv.Stats with a named exporter, which conflicts with
the variables created by the unnamed exporter. This change reuses
the stats created for the tabletserver instead.

I've tested that the old code panics, and that it doesn't panic after
the fix. But I removed the test because it can create other problems
if someone created unnamed stats elsewhere.

Signed-off-by: Sugu Sougoumarane ssougou@gmail.com

Fixes vitessio#6084.

The last exporter change introduced a regression due to NewDBConnNoPool
creating a tabletenv.Stats with a named exporter, which conflicts with
the variables created by the unnamed exporter. This change reuses
the stats created for the tabletserver instead.

I've tested that the old code panics, and that it doesn't panic after
the fix. But I removed the test because it can create other problems
if someone created unnamed stats elsewhere.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
@sougou sougou requested a review from harshit-gangal April 17, 2020 17:34
@harshit-gangal harshit-gangal merged commit ac211ce into vitessio:master Apr 18, 2020
@sougou sougou deleted the ss-exporter-panic branch April 18, 2020 22:48
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.

regression: panic in vttablet

2 participants