Skip to content

crosscluster/physical: persist standby poller progress#149913

Merged
craig[bot] merged 2 commits intocockroachdb:masterfrom
msbutler:butler-standby-poller-progress
Jul 14, 2025
Merged

crosscluster/physical: persist standby poller progress#149913
craig[bot] merged 2 commits intocockroachdb:masterfrom
msbutler:butler-standby-poller-progress

Conversation

@msbutler
Copy link
Copy Markdown
Collaborator

This patch sets the standby poller job's resolved time to the system time that standby descriptors have been updated to. This allows a reader tenant user to easily check that the poller job is running smoothly via SHOW JOB.

Epic: none

Release note: none

@msbutler msbutler self-assigned this Jul 10, 2025
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@msbutler msbutler force-pushed the butler-standby-poller-progress branch 2 times, most recently from d54c3b1 to 660ae2f Compare July 11, 2025 12:40
@msbutler msbutler marked this pull request as ready for review July 11, 2025 13:27
@msbutler msbutler requested a review from a team as a code owner July 11, 2025 13:27
@msbutler msbutler requested review from dt and jeffswenson and removed request for a team July 11, 2025 13:27
@msbutler msbutler added backport-25.1.x backport-25.2.x Flags PRs that need to be backported to 25.2 backport-25.3.x Flags PRs that need to be backported to 25.3 labels Jul 14, 2025
This patch sets the standby poller job's resolved time to the system time that
standby descriptors have been updated to. This allows a reader tenant user to
easily check that the poller job is running smoothly via SHOW JOB.

Epic: none

Release note: none
@msbutler msbutler force-pushed the butler-standby-poller-progress branch from 660ae2f to b9b328a Compare July 14, 2025 17:22
@msbutler msbutler requested a review from a team as a code owner July 14, 2025 17:22
@msbutler msbutler requested review from kyle-a-wong and removed request for a team July 14, 2025 17:22
@msbutler msbutler removed backport-25.1.x backport-25.2.x Flags PRs that need to be backported to 25.2 backport-25.3.x Flags PRs that need to be backported to 25.3 labels Jul 14, 2025
Epic: none

Release note: none
@msbutler msbutler force-pushed the butler-standby-poller-progress branch from b9b328a to d8d8fa4 Compare July 14, 2025 18:36
@dt
Copy link
Copy Markdown
Contributor

dt commented Jul 14, 2025

I'll grant that this is quick and easy, but I question if SHOW JOB X is really the flow we want to codify for inspecting this ts? What if we move away from a job for this internal implementation detail later and have the tenant connector know this or something like that (we already have the question of how to show the ts in SHOW TENANTS WITH REPLICATION STATUS)?

Should we add something like SHOW PHYSICAL REPLICATION READ TIMESTAMP which is just a delegate for reading the timestamp out of the database desc where it is already persisted?

@msbutler
Copy link
Copy Markdown
Collaborator Author

msbutler commented Jul 14, 2025

but I question if SHOW JOB X is really the flow we want to codify for inspecting this ts?

100% agree. I need this patch to add some roachtest logic to ensure the stanby poller advances. Moving forward, I plan to write up a doc in the next few days exploring where our reader tenant UX should go.

@dt
Copy link
Copy Markdown
Contributor

dt commented Jul 14, 2025

if it is just for a test, you can just crdb_internal it can't you?

@msbutler
Copy link
Copy Markdown
Collaborator Author

before this PR, we didn't persist any progress for the standby poller job.

@dt
Copy link
Copy Markdown
Contributor

dt commented Jul 14, 2025

we don't persist progress but the timestamp you're persisting here is persisted in the catalog:

on 24.3+:

select crdb_internal.pb_to_json('desc', descriptor)->'table'->'external'->'asOf'->>'wallTime' as ts from system.descriptor where id = 4 ;
          ts
-----------------------
  1752520345000000000

@msbutler
Copy link
Copy Markdown
Collaborator Author

ah right. I still feel good landing this PR so the UX in this intermediate stage is slightly better than conducting pb to json gymnastics during some escalation.

@dt
Copy link
Copy Markdown
Contributor

dt commented Jul 14, 2025

I don't think meets the new backport policy though?

@msbutler
Copy link
Copy Markdown
Collaborator Author

Chatted offline. we're fine merging this now even if this is intermediate.

bors r=dt

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jul 14, 2025

@craig craig bot merged commit cbdd88b into cockroachdb:master Jul 14, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants