Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changefeeds, ui: changefeed status is not reported in db console when there's a checkpoint #80496

Closed
dhartunian opened this issue Apr 25, 2022 · 4 comments · Fixed by #81213
Closed
Assignees
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-cdc T-jobs

Comments

@dhartunian
Copy link
Collaborator

dhartunian commented Apr 25, 2022

Currently, when a changefeed row contains a "high watermark", its status isn't reported separately in the DB console under the "status" column because it's assumed that the checkpoint is what's important.

Goal: the changefeed view should show BOTH the current status of the job and a high watermark if it's available to provide a complete picture of the job in the DB Console and match the view in SQL.

Jira issue: CRDB-15592

@dhartunian dhartunian added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-observability-inf labels Apr 25, 2022
@dhartunian dhartunian self-assigned this Apr 25, 2022
@blathers-crl blathers-crl bot added the T-cdc label Apr 25, 2022
@blathers-crl
Copy link

blathers-crl bot commented Apr 25, 2022

cc @cockroachdb/cdc

@amruss
Copy link
Contributor

amruss commented Apr 27, 2022

Hey @dhartunian I think the problem here is that we aren't updating the DB console enough, we should be showing PAUSED and CANCELED in the status field of the changefeed. RUNNING doesnt really give us any information about the changefeed, so I don't think we should add an extra columns

@blathers-crl blathers-crl bot added the T-jobs label May 4, 2022
@amruss
Copy link
Contributor

amruss commented May 4, 2022

Moving this to the jobs board for discussion around the best way to communicate protection/ other important data for jobs

@dhartunian
Copy link
Collaborator Author

@amruss I think I didn't correctly convey how the code works today. If the job contains a "highwater_timestamp" field the status column will never show a status like "running"/"paused" etc. no matter how often it updates. So the changefeed jobs end up looking confusing in the table.

I think making it look more like the SQL output will help. Here's an example that always renders the status column for every job including changefeeds and adds a highwater timestamp column for changefeed jobs:
Screenshot 2022-05-12 at 11-23-33 Jobs Cockroach Console

I agree that "Running" status is low-info for a changefeed so if you think it makes sense we can also just show the highwater timestamp when its in running status and avoid the extra column.

Also a small example of moving the highwater timestamp to the sidebar for job details
Screenshot 2022-05-12 at 11-23-45 Details Job Cockroach Console

dhartunian added a commit to dhartunian/cockroach that referenced this issue May 12, 2022
Previously, when a job contained a `highwater_timestamp` column value
(present for changefeeds) the status column in DB console would
*always* show that value instead of the job status ("running", "paused",
etc.). This would cause confusion for operators because the SQL output
for job status always included both a `status` column and a separate
`highwater_timestamp` column.

This change moves the `highwater_timestamp` into a separate column and
always renders the `status` column with the "pill" component that shows
the current job status.

The highwater timestamp is also moved to the sidebar in the job details
page instead of replacing the status pill, for similar consistency.

Resolves cockroachdb#80496

Release note (ui change): The job status page in the DB Console will now
show the status column for changefeed jobs and display the
`highwater_timestamp` value in a separate column. Thise more closely
matches the SQL output of `SHOW changefeed JOBS`.
dhartunian added a commit to dhartunian/cockroach that referenced this issue May 12, 2022
Previously, when a job contained a `highwater_timestamp` column value
(present for changefeeds) the status column in DB console would
*always* show that value instead of the job status ("running", "paused",
etc.). This would cause confusion for operators because the SQL output
for job status always included both a `status` column and a separate
`highwater_timestamp` column.

This change moves the `highwater_timestamp` into a separate column and
always renders the `status` column with the "pill" component that shows
the current job status.

The highwater timestamp is also moved to the sidebar in the job details
page instead of replacing the status pill, for similar consistency.

Finally, the highwater timestamp now displays the nanosecond decimal
value by default and the human-readable formatted value in the tooltip.
This faciliates easier copy/paste behavior from the UI as the decimal is
more useful.

Resolves cockroachdb#80496

Release note (ui change): The job status page in the DB Console will now
show the status column for changefeed jobs and display the
`highwater_timestamp` value in a separate column. Thise more closely
matches the SQL output of `SHOW changefeed JOBS`. The highwater
timestamp now displays as the nanosecond system time value by default
with the human-readable value in the tooltip since the decimal value is
copy/pasted more often.
@jlinder jlinder added sync-me and removed sync-me labels May 20, 2022
craig bot pushed a commit that referenced this issue May 24, 2022
81108: *: improve inline code comments r=maryliag a=Azhng

Release note: None

81123: sql : sequence value out of bounds r=rafiss a=mosquito2333

Previously, an additional out-of-range sequence value may have been
generated.
The original criterion was whether the previous endSequence value exceeded the limit.
However, when the current endSequence is 1, the increment is 2 and the MaxValue is 2,
the previous endSequence value is 1 and the program does not report an error.
However, when the current endSequenceValue 3 exceeds the limit, an error should be reported

In incrementSequenceUsingCache, the criterion for determining whether a cache's data is eligible is modified to whether the first data that may be stored in the cache exceeds the limit.

Fixes #74127.

Release note (bug fix): Fixed a bug where sequences could return values that are out-of-bounds in some cases.

81213: ui, changefeeds: better status col in db console r=abarganier,HonoreDB a=dhartunian

Previously, when a job contained a `highwater_timestamp` column value
(present for changefeeds) the status column in DB console would
*always* show that value instead of the job status ("running", "paused",
etc.). This would cause confusion for operators because the SQL output
for job status always included both a `status` column and a separate
`highwater_timestamp` column.

This change moves the `highwater_timestamp` into a separate column and
always renders the `status` column with the "pill" component that shows
the current job status.

The highwater timestamp is also moved to the sidebar in the job details
page instead of replacing the status pill, for similar consistency.

Finally, the highwater timestamp now displays the nanosecond decimal
value by default and the human-readable formatted value in the tooltip.
This faciliates easier copy/paste behavior from the UI as the decimal is
more useful.

![Screenshot 2022-05-12 at 16-09-19 Jobs Cockroach Console](https://user-images.githubusercontent.com/986307/168162734-48a61ec4-c5a5-41e2-9533-845afe08a0b4.png)
![Screenshot 2022-05-12 at 16-09-47 Details Job Cockroach Console](https://user-images.githubusercontent.com/986307/168162742-ee3e3f4c-136e-424f-af54-cf03fde42406.png)


Resolves #80496

Release note (ui change): The job status page in the DB Console will now
show the status column for changefeed jobs and display the
`highwater_timestamp` value in a separate column. Thise more closely
matches the SQL output of `SHOW changefeed JOBS`. The highwater
timestamp now displays as the nanosecond system time value by default
with the human-readable value in the tooltip since the decimal value is
copy/pasted more often.

Co-authored-by: Azhng <[email protected]>
Co-authored-by: mosquito2333 <[email protected]>
Co-authored-by: David Hartunian <[email protected]>
@craig craig bot closed this as completed in a725eb2 May 24, 2022
blathers-crl bot pushed a commit that referenced this issue May 24, 2022
Previously, when a job contained a `highwater_timestamp` column value
(present for changefeeds) the status column in DB console would
*always* show that value instead of the job status ("running", "paused",
etc.). This would cause confusion for operators because the SQL output
for job status always included both a `status` column and a separate
`highwater_timestamp` column.

This change moves the `highwater_timestamp` into a separate column and
always renders the `status` column with the "pill" component that shows
the current job status.

The highwater timestamp is also moved to the sidebar in the job details
page instead of replacing the status pill, for similar consistency.

Finally, the highwater timestamp now displays the nanosecond decimal
value by default and the human-readable formatted value in the tooltip.
This faciliates easier copy/paste behavior from the UI as the decimal is
more useful.

Resolves #80496

Release note (ui change): The job status page in the DB Console will now
show the status column for changefeed jobs and display the
`highwater_timestamp` value in a separate column. Thise more closely
matches the SQL output of `SHOW changefeed JOBS`. The highwater
timestamp now displays as the nanosecond system time value by default
with the human-readable value in the tooltip since the decimal value is
copy/pasted more often.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-cdc T-jobs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants