Skip to content

Conversation

@dt
Copy link
Contributor

@dt dt commented Dec 9, 2025

Release note (sql change): The WITH RESOLVED TIMESTAMP option can be passed to SHOW JOBS or SHOW JOB to include the resolved timestamp, if any, for the job in the output columns.
Epic: none.

@dt dt requested a review from msbutler December 9, 2025 18:26
@dt dt requested review from a team as code owners December 9, 2025 18:26
@dt dt requested review from michae2 and removed request for a team December 9, 2025 18:26
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@dt
Copy link
Contributor Author

dt commented Dec 9, 2025

demo@127.0.0.1:26257/system/defaultdb> select job_id, status, resolved_timestamp from 
[SHOW JOBS WITH RESOLVED TIMESTAMP] where job_type = 'REPLICATION STREAM INGESTION';
        job_id        | status  |       resolved_timestamp
----------------------+---------+---------------------------------
  1131264360252538881 | running | 1765304935000000000.0000000000
(1 row)

Time: 9ms total (execution 8ms / network 0ms)

Copy link
Collaborator

@msbutler msbutler left a comment

Choose a reason for hiding this comment

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

Could you add a one liner test? could tack on to an LDR job test

Release note (sql change): The WITH RESOLVED TIMESTAMP option can be passed to SHOW JOBS or SHOW JOB to include the resolved timestamp, if any, for the job in the output columns.
Epic: none.
@dt
Copy link
Contributor Author

dt commented Dec 9, 2025

Could you add a one liner test

Fun fact: TestShowJobs actually tests the internal vtable, not the SHOW over it, but I extended it to compare against each other.

Copy link
Collaborator

@msbutler msbutler left a comment

Choose a reason for hiding this comment

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

lGTM!

@dt
Copy link
Contributor Author

dt commented Dec 9, 2025

known cdc flake.

bors r+

craig bot pushed a commit that referenced this pull request Dec 9, 2025
155953: kvserver: simplify rewriteRaftState r=arulajmani a=pav-kv

Keys in the RangeID-local unreplicated space have both state machine and raft state. With separated engines, these will reside in different engines, and are also interleaved in an unfortunate way. So we can't use one `ClearRawRange` to cover them all, or even one per engine.

This PR clears all unreplicated keys in `rewriteRaftState` manually, so that we can control which goes to which engine/`Writer`. Additionally, this uncovers that half of these keys don't need to be cleared at all because they don't exist, or don't need to be changed.

The end effect of the PR is that `rewriteRaftState` now only mutates the raft engine state, which is very convenient. Incidentally, this function finally lives up to its name.

Part of #152845
Epic: CRDB-55220

158335: jobs/metricspoller: zero out metrics on exit r=dt a=dt

Typically only the node actively running the poller is expected to export non-zero values for poller-maintained metrics; if a node is not *actively* running the poller it should export zeros, not stale values last set when it was last running it.

This change adds on-exit calls to each of the tasks in the poller to let them zero out the metrics they each are responsible for updating when running.

Release note: none.
Epic: none.

158390: sql: support table storage params change in the declarative schema changer r=rafiss a=shghasemi

###  sql: support table storage params change in the declarative schema changer

Previously, storage parameters were set and reset using the legacy schema
changer. With this change, setting most non-backfilling table storage params
will use the declarative schema changer. Setting ttl_expire_after, schema_locked,
and infer_rbr_region_col_using_constraint is not implemented yet.

### schemachanger: handle RESET storage param in declarative schema changer

This reuses the logic that was added to handle SET. The only difference
is that RESET always drops the StorageParam element.

###  schemachanger: handle manual schema_locked setting in declarative

This storage parameter is special, so this requires logic to use the
pre-existing TableSchemaLocked element rather than the normal storage
param element.

As part of this, we partially revert bc3f228 and refactor the check to be a
little simpler since we don't actually need to handle the mixed version
case now.

Epic CRDB-31281
Fixes #155990

Release note: None

159067: util/ioctx: add RandomAccessReader for cloud storage r=sravotto a=sravotto

Add a general-purpose wrapper that provides ReadAt/Seek support for any cloud storage reader using an opener factory function pattern.

This enables random access (required by formats like Parquet) without requiring the cloud storage implementation itself to natively support ReadAt/Seek. Instead, it opens new readers at specific offsets for each ReadAt call.

Key features:
- Thread-safe ReadAt: Each call opens a new connection, allowing concurrent reads from different offsets
- Seek support: Tracks position logically without seeking underlying readers
- Generic: Works with any ReadCloserCtx via OpenerAtFunc factory

Release note: None

Epic: CRDB-23802

159068: sql/jobs: Add SHOW JOBS ... WITH RESOLVED TIMESTAMP r=dt a=dt

Release note (sql change): The WITH RESOLVED TIMESTAMP option can be passed to SHOW JOBS or SHOW JOB to include the resolved timestamp, if any, for the job in the output columns.
Epic: none.

Co-authored-by: Pavel Kalinnikov <pavel@cockroachlabs.com>
Co-authored-by: David Taylor <davidt@davidt.io>
Co-authored-by: Shadi Ghasemitaheri <shadi.ghasemitaheri@cockroachlabs.com>
Co-authored-by: Rafi Shamim <rafi@cockroachlabs.com>
Co-authored-by: Silvano Ravotto <silvano@cockroachlabs.com>
@craig
Copy link
Contributor

craig bot commented Dec 9, 2025

Build failed (retrying...):

craig bot pushed a commit that referenced this pull request Dec 9, 2025
158335: jobs/metricspoller: zero out metrics on exit r=dt a=dt

Typically only the node actively running the poller is expected to export non-zero values for poller-maintained metrics; if a node is not *actively* running the poller it should export zeros, not stale values last set when it was last running it.

This change adds on-exit calls to each of the tasks in the poller to let them zero out the metrics they each are responsible for updating when running.

Release note: none.
Epic: none.

158390: sql: support table storage params change in the declarative schema changer r=rafiss a=shghasemi

###  sql: support table storage params change in the declarative schema changer

Previously, storage parameters were set and reset using the legacy schema
changer. With this change, setting most non-backfilling table storage params
will use the declarative schema changer. Setting ttl_expire_after, schema_locked,
and infer_rbr_region_col_using_constraint is not implemented yet.

### schemachanger: handle RESET storage param in declarative schema changer

This reuses the logic that was added to handle SET. The only difference
is that RESET always drops the StorageParam element.

###  schemachanger: handle manual schema_locked setting in declarative

This storage parameter is special, so this requires logic to use the
pre-existing TableSchemaLocked element rather than the normal storage
param element.

As part of this, we partially revert bc3f228 and refactor the check to be a
little simpler since we don't actually need to handle the mixed version
case now.

Epic CRDB-31281
Fixes #155990

Release note: None

159068: sql/jobs: Add SHOW JOBS ... WITH RESOLVED TIMESTAMP r=dt a=dt

Release note (sql change): The WITH RESOLVED TIMESTAMP option can be passed to SHOW JOBS or SHOW JOB to include the resolved timestamp, if any, for the job in the output columns.
Epic: none.

Co-authored-by: David Taylor <davidt@davidt.io>
Co-authored-by: Shadi Ghasemitaheri <shadi.ghasemitaheri@cockroachlabs.com>
Co-authored-by: Rafi Shamim <rafi@cockroachlabs.com>
@craig
Copy link
Contributor

craig bot commented Dec 10, 2025

Build failed (retrying...):

  • unit_tests

@craig
Copy link
Contributor

craig bot commented Dec 10, 2025

@craig craig bot merged commit 75cb32b into cockroachdb:master Dec 10, 2025
23 of 24 checks passed
@dt dt deleted the show-ts branch December 10, 2025 02:44
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