-
Notifications
You must be signed in to change notification settings - Fork 2.3k
v3: migration support for lookup vindexes #3600
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
Changes from all commits
4179683
b69d703
3d7fa5d
64938d0
1a9d296
2976db6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,12 +42,20 @@ const ListVarName = "__vals" | |
| type VCursor interface { | ||
| // Context returns the context of the current request. | ||
| Context() context.Context | ||
|
|
||
| // V3 functions. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For the newcomer to the code it would be great to provide some more context on what "V3" means -- something like "Routing functions used by Vindex operations" would be clearer than "V3". Perhaps you eventually plan to have the VCursor used in other contexts, but AFAIK |
||
| Execute(method string, query string, bindvars map[string]*querypb.BindVariable, isDML bool) (*sqltypes.Result, error) | ||
| ExecuteAutocommit(method string, query string, bindvars map[string]*querypb.BindVariable, isDML bool) (*sqltypes.Result, error) | ||
|
|
||
| // Shard-level functions. | ||
| ExecuteMultiShard(keyspace string, shardQueries map[string]*querypb.BoundQuery, isDML, canAutocommit bool) (*sqltypes.Result, error) | ||
| ExecuteStandalone(query string, bindvars map[string]*querypb.BindVariable, keyspace, shard string) (*sqltypes.Result, error) | ||
| StreamExecuteMulti(query string, keyspace string, shardVars map[string]map[string]*querypb.BindVariable, callback func(reply *sqltypes.Result) error) error | ||
|
|
||
| // Topo functions. | ||
| GetKeyspaceShards(vkeyspace *vindexes.Keyspace) (string, []*topodatapb.ShardReference, error) | ||
| GetShardForKeyspaceID(allShards []*topodatapb.ShardReference, keyspaceID []byte) (string, error) | ||
| GetShardsForKsids(allShards []*topodatapb.ShardReference, ksids vindexes.Ksids) ([]string, error) | ||
| } | ||
|
|
||
| // Plan represents the execution strategy for a given query. | ||
|
|
||
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.
Maybe we can remove
keyRangeToShardMapaltogether and do something like: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.
I was about to do it. Then realized that we can eventually deprecate this (all V2). So, left it mostly untouched.