cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
29.92k stars 3.78k forks source link

ldr: job description does not include options for the stream #128960

Open stevendanna opened 1 month ago

stevendanna commented 1 month ago

Describe the problem

This job was created with a custom UDF, but that isn't reflected in the job's description:

demo@127.0.0.1:26257/demoapp/a> show job 994737055127273473;                                                                                                                                                                                                                                                              
        job_id       |      job_type       |                          description                           | statement | user_name | status  |                       running_status                       |        created         |        started         | finished |        modified        | fraction_completed | error | coordinator_id |      trace_id       | execution_errors
---------------------+---------------------+----------------------------------------------------------------+-----------+-----------+---------+------------------------------------------------------------+------------------------+------------------------+----------+------------------------+--------------------+-------+----------------+---------------------+-------------------
  994737055127273473 | LOGICAL REPLICATION | LOGICAL REPLICATION STREAM into a.public.kv_with_version from  |           | demo      | running | logical replication running: 2024-08-14 13:11:45 +0000 UTC | 2024-08-14 12:54:17+00 | 2024-08-14 12:54:30+00 | NULL     | 2024-08-14 13:11:49+00 |               NULL |       |       

Jira issue: CRDB-41305

blathers-crl[bot] commented 1 month ago

cc @cockroachdb/disaster-recovery

stevendanna commented 1 month ago

Perhaps we fix this instead by adding these to SHOW LOGICAL REPLICATION JOB so that we don't bloat the description.

stevendanna commented 1 month ago

@azhu-crl @msbutler I'm not really sure this is closed. Having the conflict type in the details is good, but:

msbutler commented 1 month ago

@stevendanna hrmm, i now feel like we should just store this stuff in the Description or in a new DetailedDescription (avoiding db console weirdness) that SHOW LOGICAL REPLICATION JOBS will use.

It feels like too much work to:

The shape of this UX may change further.

Since we've got bigger fish to fry, i now think we should implement something quick and dirty and move on. We can refine this later. thoughts?

stevendanna commented 1 month ago

I'm 100% OK with throwing the complete (redacted) sql statement somewhere (just like we do for backup/restore/changefeeds/etc) and then working on exactly what is useful to split out over time.

msbutler commented 1 month ago

@azhu-crl could you work on a follow up PR to add options to the description and to ensure that the URL is redacted? Then we can return this description in SHOW LOGICAL REPLICATION JOBS.

Independently, I still think it would be a good idea to display the fully qualified names in the target column of SHOW LOGICAL REPLICATION JOBS.

azhu-crl commented 1 month ago

Will do!