Skip to content

vindex: region_experimental#5390

Merged
deepthi merged 7 commits intovitessio:masterfrom
planetscale:ss-vindex
Nov 6, 2019
Merged

vindex: region_experimental#5390
deepthi merged 7 commits intovitessio:masterfrom
planetscale:ss-vindex

Conversation

@sougou
Copy link
Contributor

@sougou sougou commented Nov 1, 2019

Implements #5375

A new geo_experimental vindex has been created to showcase the new capabilities. The vindex combines a region and an id to generate a keyspace_id. At the same time, it saves a lookup entry from id to keyspace_id.

@sougou sougou requested a review from deepthi November 1, 2019 04:19
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should rename it to multi-region-vindex or something that can convey what it will do clearly

@saifalharthi
Copy link
Contributor

using geo prefix got me confused and made me think that it would be a spatial indexing technique or would require partitioning to spatial objects. I think it should be renamed to something more clear.

@morgo
Copy link
Contributor

morgo commented Nov 1, 2019

using geo prefix got me confused and made me think that it would be a spatial indexing technique or would require partitioning to spatial objects. I think it should be renamed to something more clear.

I agree :-) If we want to get pedantic, legal jurisdictions are not purely by a geographical scheme. We just think of them like that.

@sougou
Copy link
Contributor Author

sougou commented Nov 1, 2019

For now, I'll go with region_experimental.

@sougou sougou changed the title vindex: geo_experimental vindex: region_experimental Nov 1, 2019
The IsFunctional support function was mostly unused. The only
place left was in the vstreamer.

It was protecting from a vstreamer using a lookup vindex because
vstreamer doesn't have a VCursor. This is now addressed by the
lookup vindexes checking for VCursor being nil.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
Bind var initialization was duplicated in different parts of
the primitive. It's now unified and done after all the vindexes
are processed.

Also, the primary vindex code was flattening the vindex values
because it assumed only one column. The code has been rewritten
to not assume this.

This prepares us for the next step, which is to implement MapNew
that will accept multi-column vindex values.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
@deepthi deepthi merged commit 8de7237 into vitessio:master Nov 6, 2019
@sougou sougou deleted the ss-vindex branch November 24, 2019 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants