-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[tablet, queryrules] Extend query rules to check comments #7784
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setassociative
force-pushed
the
extend-queryrules
branch
2 times, most recently
from
April 15, 2021 07:56
372425e
to
54898e7
Compare
Signed-off-by: Richard Bailey <rbailey@slack-corp.com>
…o work as expected Signed-off-by: Richard Bailey <rbailey@slack-corp.com>
Signed-off-by: Richard Bailey <rbailey@slack-corp.com>
Signed-off-by: Richard Bailey <rbailey@slack-corp.com>
Signed-off-by: Richard Bailey <rbailey@slack-corp.com>
Signed-off-by: Richard Bailey <rbailey@slack-corp.com>
Fix bug in how we attach RE to the rule in rulesctl Signed-off-by: Richard Bailey <rbailey@slack-corp.com>
Signed-off-by: Richard Bailey <rbailey@slack-corp.com>
setassociative
requested review from
harshit-gangal,
shlomi-noach and
systay
as code owners
April 15, 2021 15:19
From our discussions, going to merge this to our branch and start playing with it in our environment. |
rafael
approved these changes
Apr 19, 2021
This was referenced Apr 19, 2021
systay
added
Component: Query Serving
Type: Enhancement
Logical improvement (somewhere between a bug and feature)
labels
Apr 28, 2021
8 tasks
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)
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.
Description
This PR makes three changes
fsnotify
to watch for changes vs the rules filerulesctl
Details: Watching the file
We use fsnotify which seems to be the generally accepted approach. There are some gymnastics necessary as watching the specific file is prone to losing track of it in the event that the file is deleted+recreated. To handle this case we watch the directory containing the file and react only when the node we receive events for matches the file we are watching.
Details: Filtering on MarginComments
This was mostly plumbing within the
Rule
itself + the application callstack as thetabletserver/query_executor::QueryExecutor
has already baked margin comments into it during the initial phase of the Execute call.Evaluation is similar to but not the same as the Query regexp because that is stable across query shapes (otherwise it wouldn't be the same query). For margin comments we need to defer evaluation until after the plan cache which is why Query & comments take different paths.
Test failures
The only listed failure is
endtoend/tabletmanager/tablegc
which seems unlikely to be related afaict.Related Issue(s)
n/a
Checklist
Deployment Notes
No changes necessary for existing deployments.
Impacted Areas in Vitess
Components that this PR will affect: