Skip to content

spanconfig: add ability to get all system span configs set by host#76704

Closed
arulajmani wants to merge 1 commit intocockroachdb:masterfrom
arulajmani:protectedts-kvaccessor-get-all-system-span-configs
Closed

spanconfig: add ability to get all system span configs set by host#76704
arulajmani wants to merge 1 commit intocockroachdb:masterfrom
arulajmani:protectedts-kvaccessor-get-all-system-span-configs

Conversation

@arulajmani
Copy link
Copy Markdown
Collaborator

This patch adds a GetAllSystemSpanConfigRecordsSetByHost method to
the KVAccessor interface. Only the host tenant's KVAccessor
implementation is allowed to query for these records; secondary tenants
are not.

This is intended as a fast path for the host tenant's reconciliation
job to populate it's in-memory view of all system span configurations.
This in-memory view can then be diffed against the implied system span
configuration state to issue targeted updates/deletes, much like we do
today for regular span configurations.

Release note: None

@arulajmani arulajmani requested a review from a team as a code owner February 16, 2022 20:49
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

This patch adds a `GetAllSystemSpanConfigRecordsSetByHost` method to
the KVAccessor interface. Only the host tenant's KVAccessor
implementation is allowed to query for these records; secondary tenants
are not.

This is intended as a fast path for the host tenant's reconciliation
job to populate it's in-memory view of all system span configurations.
This in-memory view can then be diffed against the implied system span
configuration state to issue targeted updates/deletes, much like we do
today for regular span configurations.

Release note: None
@arulajmani arulajmani force-pushed the protectedts-kvaccessor-get-all-system-span-configs branch from d843f5c to 6279c2b Compare February 16, 2022 21:52
craig bot pushed a commit that referenced this pull request Feb 18, 2022
76670: backup: move resolution from planning to exec r=dt a=dt

Release note (ops change): the cluster setting bulkio.backup.resolve_destination_in_job.enabled can be used to delay resolution of backup's destination until the job starts running.

76721: spanconfig: introduce new read-only system target r=arulajmani a=arulajmani

This patch is motivated by the host tenant's desire to fetch all system
span configurations it has installed over secondary tenants without
explicitly constructing targets for all tenant IDs in the system. This
is handy for the host tenant's reconciliation job, which populates an
in-memory view of all system span configurations to diff against the
state implied by the schema. This in-turn allows the host tenant to issue
targeted updates/deletes.

We introduce a new system target type to achieve this which allows a
tenant to request all system span configurations it has installed that
target tenants. This is only ever consequential in the context of the
host as only the host tenant can install system span configurations on
other tenants. We also make this target read-only, in that, we disallow
persisting its implied encoding in `system.span_configurations`. We add
validation to the KVAccessor to this effect.

While here, we also disallow creating span targets that overlap with
the reserved system span configuration keyspace.

Release note: None

----
Alternative approach to #76704

76757: ui: change invalid lease to expired lease on problem ranges page r=Santamaura a=Santamaura

When browsing the problem ranges page and invalid leases appears customers
regularly are concerned with this status as they interpret it as something
with the cluster is wrong which is often not the case. In order to imrpove this,
the invalid lease section has been changed to expired lease and there is a
description added below which explains that this status is often not a cause
for concern.

Release note (ui change): change invalid lease to expired lease on problem ranges page

Resolves: #38616

![Screen Shot 2022-02-17 at 3 06 19 PM](https://user-images.githubusercontent.com/17861665/154571094-4454f4e9-9cec-471c-8c41-48c6f1afd5a4.png)


Co-authored-by: David Taylor <tinystatemachine@gmail.com>
Co-authored-by: arulajmani <arulajmani@gmail.com>
Co-authored-by: Santamaura <santamaura@cockroachlabs.com>
@arulajmani arulajmani closed this Feb 22, 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.

2 participants