Skip to content

roachpb: InternalServer API for tenant settings#74268

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
RaduBerinde:tenant-settings-api
Jan 11, 2022
Merged

roachpb: InternalServer API for tenant settings#74268
craig[bot] merged 1 commit intocockroachdb:masterfrom
RaduBerinde:tenant-settings-api

Conversation

@RaduBerinde
Copy link
Copy Markdown
Member

This commit introduces the API that the tenants will use to obtain and
list for updates to tenant setting overrides. The API was designed to
allow for maximum flexibility on the server side so that it can be
implemented as a range feed without any extra state (if necessary).

Release note: None

@RaduBerinde RaduBerinde requested review from ajwerner and dt December 24, 2021 05:05
@RaduBerinde RaduBerinde requested a review from a team as a code owner December 24, 2021 05:05
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@RaduBerinde
Copy link
Copy Markdown
Member Author

Friendly ping.

Copy link
Copy Markdown
Contributor

@ajwerner ajwerner left a comment

Choose a reason for hiding this comment

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

High level LGTM

Reviewed 1 of 3 files at r1.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @dt and @RaduBerinde)


pkg/roachpb/api.proto, line 2631 at r1 (raw file):

// server side (e.g. to make it maintain very little state per tenant).
message TenantSettingsEvent {
  // Tier indicates the tier and is either 1 or 2.

Any interest in a gogoproto.casttype?

Code quote:

  // Tier indicates the tier and is either 1 or 2.
  uint32 tier = 1;

pkg/roachpb/api.proto, line 2646 at r1 (raw file):

  // Overrides contains:
  //  - all current setting overrides for the given tier if Incremental is
  //    false; or 

nit: trailing spaces

@RaduBerinde RaduBerinde force-pushed the tenant-settings-api branch 2 times, most recently from 09705e6 to 36d2fdc Compare January 10, 2022 18:51
Copy link
Copy Markdown
Member Author

@RaduBerinde RaduBerinde left a comment

Choose a reason for hiding this comment

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

TFTR!

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @ajwerner and @dt)


pkg/roachpb/api.proto, line 2631 at r1 (raw file):

Previously, ajwerner wrote…

Any interest in a gogoproto.casttype?

Good idea, done. While writing this I also thought about whether precedence would be more descriptive than tier.

Copy link
Copy Markdown
Contributor

@dt dt left a comment

Choose a reason for hiding this comment

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

I like "precedence" too

Copy link
Copy Markdown
Member Author

@RaduBerinde RaduBerinde left a comment

Choose a reason for hiding this comment

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

I like "precedence" too

Done! TFTR!

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @ajwerner)


pkg/roachpb/api.proto, line 2651 at r5 (raw file):

  //    fields).
  repeated TenantSetting overrides = 3;

Moved this error field, I must have put it inside TenantSetting by accident.

Copy link
Copy Markdown
Contributor

@ajwerner ajwerner left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @ajwerner and @RaduBerinde)


pkg/roachpb/api.proto, line 2631 at r1 (raw file):

Previously, RaduBerinde wrote…

Good idea, done. While writing this I also thought about whether precedence would be more descriptive than tier.

Also +1 on precedence

This commit introduces the API that the tenants will use to obtain and
list for updates to tenant setting overrides. The API was designed to
allow for maximum flexibility on the server side so that it can be
implemented as a range feed without any extra state (if necessary).

Release note: None
@RaduBerinde
Copy link
Copy Markdown
Member Author

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jan 11, 2022

Build succeeded:

@craig craig bot merged commit 6e3928e into cockroachdb:master Jan 11, 2022
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