cockroach icon indicating copy to clipboard operation
cockroach copied to clipboard

jobs: use builtin to synthesize pending session job rows in vtable

Open dt opened this issue 5 months ago • 3 comments

This adds a builtin to enumerate jobs pending creation in the current session. It then adds a UNION with a call to this builtin, rather than directly accessing the session in the Go code, to the body of the crdb_internal.jobs vtable, bringing the vtable closer to being just a pure query that can be replaced by a delegate or view.

Additionally, deprecated columns in the vtable, which were always null, are removed.

Release note: none. Epic: none.a

dt avatar Jun 17 '25 19:06 dt

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

:owl: Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

blathers-crl[bot] avatar Jun 17 '25 19:06 blathers-crl[bot]

This change is Reviewable

cockroach-teamcity avatar Jun 17 '25 19:06 cockroach-teamcity

SHOW JOBS (as apposed to adding NULL as trace_id, NULL as execution_errors

These columns already aren't in plain ol SHOW JOBS, right? the conditional they were added in meant they were only in SHOW JOB X / SHOW JOBS x, y, z (and were always null/useless since 25.1).

dt avatar Jun 18 '25 16:06 dt

gonna move on to the auth builtin and then the view which I think is when we'll move the WHERE clause around anyway

TFTR!

bors r+

dt avatar Jun 18 '25 19:06 dt