Skip to content

Conversation

otan
Copy link
Contributor

@otan otan commented Jul 1, 2021

Resolves CRDB-2513

See individual commits for details.

@otan otan requested review from a team, ajstorm, arulajmani and irfansharif July 1, 2021 00:09
@otan otan requested a review from a team as a code owner July 1, 2021 00:09
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@otan otan requested a review from a team as a code owner July 1, 2021 02:44
@otan otan force-pushed the connector_v2 branch 2 times, most recently from 1d3c613 to e6c1f3e Compare July 1, 2021 06:11
@otan otan requested review from a team and pbardea and removed request for a team July 1, 2021 06:11
@otan otan force-pushed the connector_v2 branch 2 times, most recently from 1d94223 to eadfeff Compare July 1, 2021 06:33
@pbardea pbardea removed their request for review July 1, 2021 14:18
Copy link
Collaborator

@ajstorm ajstorm left a comment

Choose a reason for hiding this comment

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

Nice! Looks good to me, but I'm not very familiar with most of the code you've touched. Hopefully @irfansharif and/or @arulajmani can have a look too.

Reviewed 6 of 6 files at r1, 22 of 22 files at r2, 3 of 3 files at r3, 7 of 7 files at r4, 2 of 2 files at r5.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @arulajmani, @irfansharif, and @otan)


pkg/ccl/backupccl/testdata/backup-restore/multiregion, line 15 at r3 (raw file):

us-east-1
us-west-1
eu-central-1

Nit: hmm, why does "eu" come after "us" if we're ordering by region? 🤔

@otan
Copy link
Contributor Author

otan commented Jul 8, 2021


pkg/ccl/backupccl/testdata/backup-restore/multiregion, line 15 at r3 (raw file):

Previously, ajstorm (Adam Storm) wrote…

Nit: hmm, why does "eu" come after "us" if we're ordering by region? 🤔

The outer select can reorder things iiuc

Copy link
Collaborator

@dhartunian dhartunian left a comment

Choose a reason for hiding this comment

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

Reviewed 5 of 6 files at r1, 34 of 34 files at r6, 22 of 22 files at r7, 3 of 3 files at r8.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @ajstorm, @arulajmani, @dhartunian, @irfansharif, and @otan)


pkg/server/serverpb/status.proto, line 1113 at r6 (raw file):

  rpc Regions(RegionsRequest) returns (RegionsResponse) {
    option (google.api.http) = {
      get : "/_status/regions"

just trying to check my understanding here: we don't strictly need the http API annotation to enable this feature, right?

I think we're trying to avoid adding more HTTP endpoints under _status since we've moved ahead with the v2 API tree which will eventually end up marking everything under _status as deprecated. maybe @itsbilal can opine.

Copy link
Contributor Author

@otan otan left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @ajstorm, @arulajmani, @dhartunian, @irfansharif, and @itsbilal)


pkg/server/serverpb/status.proto, line 1113 at r6 (raw file):

Previously, dhartunian (David Hartunian) wrote…

just trying to check my understanding here: we don't strictly need the http API annotation to enable this feature, right?

I think we're trying to avoid adding more HTTP endpoints under _status since we've moved ahead with the v2 API tree which will eventually end up marking everything under _status as deprecated. maybe @itsbilal can opine.

i've removed it, but it still shows up in the docs.

Copy link
Collaborator

@arulajmani arulajmani left a comment

Choose a reason for hiding this comment

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

:lgtm:

Sorry for taking so long on this, breather week and what not :)

Reviewed 2 of 6 files at r1, 37 of 37 files at r11, 23 of 23 files at r12, 4 of 4 files at r13, 8 of 8 files at r14, 3 of 3 files at r15.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @ajstorm, @irfansharif, @itsbilal, and @otan)


pkg/server/status.go, line 1299 at r11 (raw file):

	ctx context.Context, req *serverpb.RegionsRequest,
) (*serverpb.RegionsResponse, error) {
	resp, _, err := s.nodesHelper(ctx, 0, 0)

nit: comments after constants

otan added 5 commits July 13, 2021 10:50
In preparation for exposing regions as a kvtenant.Connector API,
introduce an endpoint which returns all valid regions in a cluster.

Release note (general change): Introduce a /_status/regions endpoint
which returns all regions along with their availability zones.
Release note (sql change): Introduce a crdb_internal.regions table which
contains data on all regions in the cluster.
This currently collects the same data, but all the aggregation is
already done on the crdb_internal.regions output.

Release note: None
This enables the use of crdb_internal.regions from a tenant.

Release note (general change): crdb_internal.regions is now accessible
from a tenant.
Tests multi-region cluster with tenants.

Only SHOW REGIONS FOR CLUSTER works at this stage.

Release note: None
@otan
Copy link
Contributor Author

otan commented Jul 13, 2021

thanks

bors r=arulajmani

@craig
Copy link
Contributor

craig bot commented Jul 13, 2021

Build succeeded:

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.

5 participants