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

Moved creation of topo.Server outside of tx_throttler. #2568

Merged
merged 1 commit into from
Feb 23, 2017

Conversation

erzel
Copy link
Contributor

@erzel erzel commented Feb 16, 2017

@alainjobart PTAL.

@alainjobart
Copy link
Contributor

You didn't have to change vttablet.go / vtcombo.go?

@erzel erzel force-pushed the passing_topo_server_to_tx_throttler branch from f254e39 to 787661f Compare February 16, 2017 23:14
@erzel
Copy link
Contributor Author

erzel commented Feb 16, 2017

Oops. You're right. I've updated these files. I've code searched for all other callers of NewServer / NewTabletServer and couldn't find any others. PTAL.

@@ -74,7 +74,8 @@ func main() {
}

// creates and registers the query service
qsc := tabletserver.NewServer()
ts := topo.Open()
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this function idempotent, or can it be made so? If so, we can have TabletServer start this as a sub-service internally, which will be in line with the rest of the sub-services. We'll also reduce one dependency.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think the function is idempotent, currently. It looks to me like it opens an RPC connection.

Copy link
Contributor

Choose a reason for hiding this comment

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

This function is creating a new object, it should actually be called 'New'. We used to have a single 'global' topo server, and that was a bad pattern that made a whole bunch of tests really hard to manage.

@alainjobart
Copy link
Contributor

Change looks good, but can you make sure the unit tests pass locally before review? thanks!

@erzel erzel force-pushed the passing_topo_server_to_tx_throttler branch from 787661f to 370c55f Compare February 22, 2017 19:32
@erzel
Copy link
Contributor Author

erzel commented Feb 22, 2017

Sorry Alain. I'll make sure the tests are passing next time. PTAL.

@erzel erzel force-pushed the passing_topo_server_to_tx_throttler branch from 370c55f to 0bdc2d2 Compare February 23, 2017 23:03
@erzel erzel merged commit b11e9f9 into vitessio:master Feb 23, 2017
frouioui pushed a commit to planetscale/vitess that referenced this pull request Mar 26, 2024
* Parse Insights flags with pflags

This allows us to deprecate `-insights_reorder_threshold` properly

Signed-off-by: Patrick Reynolds <patrick@piki.org>

* Don't expect Insights flags for vtexplain

Insights flags are only valid for vtgate.

Signed-off-by: Patrick Reynolds <patrick@piki.org>

---------

Signed-off-by: Patrick Reynolds <patrick@piki.org>
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.

4 participants