vtgate: validate important flags during startup #8218
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 :
now you will see it a bit clear:
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:
also if you Accidentally configured -tablet_types_to_wait flag wrongly like below:
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