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

vtgate: validate important flags during startup #8218

Merged

Conversation

harshit-gangal
Copy link
Member

@harshit-gangal harshit-gangal commented May 31, 2021

Taken from #7251 to get it merged.

1.modify proper annotations for gates
2.add CheckCellFlags function to give valid check before gates creating
3.CheckCellFlags will help to avoid strange behaviors when there are invalid parameters of the cell-related set
vtgate brings up but actually does not work correctly.

Before :
when you are setting cell wrong you will get some confusing error outputs like :
image
now you will see it a bit clear:
image

You could also set cell flag correct but cells_to_watch flag with two does not existing cells but vtgate will could also bring up but just will serve not as expectingly. like below:
image
image

also if you Accidentally configured -tablet_types_to_wait flag wrongly like below:
image
also, vtgate will runs but when you are using a command like use @replica
and then you send a query like "select * from table1" it will send qps to all tablets with all types.

CheckCellFlags will help to make an in advance valid check and give hints to make people check and be familiar with the key parameters on cell-related flags

Description

Related Issue(s)

Closes #3955

Checklist

  • Tests were added or are not required
  • Documentation was added or is not required

2.add key flags valid check when gates creating

Signed-off-by: JohnnyThree <whereshallyoube@gmail.com>
@deepthi deepthi changed the title Add key flags valid check when gates creating vtgate: validate important flags during startup Jun 1, 2021
Copy link
Member

@frouioui frouioui left a comment

Choose a reason for hiding this comment

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

Just a couple of nits! Looking good @Johnny-Three

go/cmd/vtgate/vtgate.go Outdated Show resolved Hide resolved
go/cmd/vtgate/vtgate.go Outdated Show resolved Hide resolved
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
@systay systay added Type: Enhancement Logical improvement (somewhere between a bug and feature) and removed Type: Feature Request labels Jun 2, 2021
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Query Serving Type: Enhancement Logical improvement (somewhere between a bug and feature)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vtgate doesn't report missing cell properly
4 participants