-
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
LookupVindex: Implement internalize
command for lookup vindexes
#17429
LookupVindex: Implement internalize
command for lookup vindexes
#17429
Conversation
Signed-off-by: Noble Mittal <noblemittal@outlook.com>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Signed-off-by: Noble Mittal <noblemittal@outlook.com>
Signed-off-by: Noble Mittal <noblemittal@outlook.com>
Signed-off-by: Noble Mittal <noblemittal@outlook.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17429 +/- ##
==========================================
- Coverage 67.68% 67.67% -0.02%
==========================================
Files 1586 1586
Lines 255170 255403 +233
==========================================
+ Hits 172722 172839 +117
- Misses 82448 82564 +116 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Noble Mittal <noblemittal@outlook.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good! I only had some minor comments and suggestions. Let me know what you think.
go/cmd/vtctldclient/command/vreplication/lookupvindex/lookupvindex.go
Outdated
Show resolved
Hide resolved
go/cmd/vtctldclient/command/vreplication/lookupvindex/lookupvindex.go
Outdated
Show resolved
Hide resolved
go/cmd/vtctldclient/command/vreplication/lookupvindex/lookupvindex.go
Outdated
Show resolved
Hide resolved
Signed-off-by: Noble Mittal <noblemittal@outlook.com>
54753a4
to
ee296d2
Compare
Signed-off-by: Noble Mittal <noblemittal@outlook.com>
Signed-off-by: Noble Mittal <noblemittal@outlook.com>
…Workflow Signed-off-by: Noble Mittal <noblemittal@outlook.com>
Signed-off-by: Noble Mittal <noblemittal@outlook.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking really good! I still had a few outstanding questions/concerns though. Happy to sit down and walk through things if you like. I could be missing or misunderstanding some things as well so we could quickly get on the same page.
Signed-off-by: Noble Mittal <noblemittal@outlook.com>
2e3db09
to
e866118
Compare
Signed-off-by: Noble Mittal <noblemittal@outlook.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code all looks great now! The only thing left, IMO, is updating some of the user facing text (and dev facing comments) based on the current behavior after the changes. As you now know, this can easily get confusing so any clarity we can add is worth it.
Hopefully it makes sense. Feel free to grab me on slack if not. Thank you for hanging in there! 🙂
go/cmd/vtctldclient/command/vreplication/lookupvindex/lookupvindex.go
Outdated
Show resolved
Hide resolved
go/cmd/vtctldclient/command/vreplication/lookupvindex/lookupvindex.go
Outdated
Show resolved
Hide resolved
go/cmd/vtctldclient/command/vreplication/lookupvindex/lookupvindex.go
Outdated
Show resolved
Hide resolved
go/cmd/vtctldclient/command/vreplication/lookupvindex/lookupvindex.go
Outdated
Show resolved
Hide resolved
go/cmd/vtctldclient/command/vreplication/lookupvindex/lookupvindex.go
Outdated
Show resolved
Hide resolved
Signed-off-by: Noble Mittal <noblemittal@outlook.com>
Signed-off-by: Noble Mittal <noblemittal@outlook.com>
Signed-off-by: Noble Mittal <noblemittal@outlook.com>
thank you so much @mattlord for the review! ❤️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you for all of the time and effort that you put into this, @beingnoble03 !
I only had one remaining question about the client help text. Let me know what you think and we'll get this quickly merged.
@@ -158,7 +179,7 @@ var ( | |||
// externalize makes a LookupVindexExternalize call to a vtctld. | |||
externalize = &cobra.Command{ | |||
Use: "externalize", | |||
Short: "Externalize the Lookup Vindex. If the Vindex has an owner the VReplication workflow will also be deleted.", | |||
Short: "Externalize the Lookup Vindex. If the Vindex has an owner the VReplication workflow will also be stopped/deleted.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This text is a bit off IMO. If we're not able to set the owner (the backing table) as part of the externalize then it's an error. No? Unless I'm missing something, then I think this is better:
"Externalize the Vindex so that it can be used for queries and stop (or optionally delete) the workflow."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, we don't return an error if the vindex is unowned while externalizing, instead we just remove the write_only
param from the vindex. This is the old behaviour that we follow in LookupVindexExternalize
. Do you think we should change this behaviour (we can return error for unowned vindexes)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, fine to leave it as is then. Been a while since I was in this code so had forgotten. Thanks!
Signed-off-by: Noble Mittal <noblemittal@outlook.com>
Description
This PR
internalize
andcomplete
command for lookup vindexesexternalize
command where we stop the workflow and mark it as frozen instead of deleting it.complete
command checks if the lookup vindex is externalized, and if it has an owner, it deletes the workflow.internalize
command starts the frozen streams (if there's an owner) and sets thewrite_only
vindex param back totrue
(which was deleted when lookup vindex was externalized.)Related Issue(s)
LookupVindex
has nointernalize
command (equivalent toReverseTraffic
) #15985Checklist
Deployment Notes