ApplySchema: do not ReloadSchema on ExecuteFetchAsDba#10739
ApplySchema: do not ReloadSchema on ExecuteFetchAsDba#10739shlomi-noach merged 9 commits intovitessio:mainfrom
Conversation
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Bug fixes
Non-trivial changes
New/Existing features
Backward compatibility
|
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Bug fixes
Non-trivial changes
New/Existing features
Backward compatibility
|
|
seems like it might be related to changes in this PR, because the failure comes shortly after |
|
seems related. |
|
I'm lost with the test failures. |
|
|
|
OK I get it! says |
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
|
OK, tests still failing, and they're consistent, and they're persistent, and it has to do with |
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
| } | ||
|
|
||
| if syncOperationExecuted { | ||
| if true || syncOperationExecuted { |
There was a problem hiding this comment.
I think we can drop this true now that we found the real issue?
There was a problem hiding this comment.
Yes. refactoring and also reusing your defer approach to ensure we ReloadSchema even on early return.
Doing this is almost always a bug anyway so we should lint for this to avoid problems. This would have caught the bug that was plaguing us in vitessio#10739 as it's easy to overlook this type of issue. So we'd rather prefer the linter catches it for next time. Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
|
Thanks @dbussink for helping to find the root cause, which was reusing an iteration argument's address. |
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
…nce (#10763) Doing this is almost always a bug anyway so we should lint for this to avoid problems. This would have caught the bug that was plaguing us in #10739 as it's easy to overlook this type of issue. So we'd rather prefer the linter catches it for next time. Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
vitessio#848) * ApplySchema: do not ReloadSchema on ExecuteFetchAsDba Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * include primary in final ReloadSchema Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * experimental: always reload schema, even in Online DDL Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * RateLimiter: exit goroutine at Stop() Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * defer ticker.Stop() Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix shard iteration Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * ensure to ReloadSchema even on early return Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Description
Followup to #10719
There is yet another location where
ReloadSchemais called: from within the VTTablet, and this is controlled as a parameter inExecuteFetchAsDba. We now strictly do not callReloadSchemaanywhere until all SQLs have been applied.This specific PR applies to
directDDLs, not to Online DDLs.Related Issue(s)
#10719
Checklist
Deployment Notes