Skip to content

jobs: separate description from command#35439

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
RaduBerinde:event-command
Mar 7, 2019
Merged

jobs: separate description from command#35439
craig[bot] merged 1 commit intocockroachdb:masterfrom
RaduBerinde:event-command

Conversation

@RaduBerinde
Copy link
Member

This change adds a Command field to jobspb.Payload (and a
corresponding command column to crdb_internal.jobs). The stats job
now shows the internal command in the expanded job view. If the
command isn't present, the description is assumed to be the command.

Release note: None

Example:
image

@RaduBerinde RaduBerinde requested review from a team, madelynnblue and vilterp March 5, 2019 23:35
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@RaduBerinde RaduBerinde requested a review from a team March 6, 2019 01:20
<div>
<h3>Command</h3>
<pre className="job-detail">{job.description}</pre>
<pre className="job-detail">{job.command ? job.command : job.description}</pre>
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I think this could be simplified to job.command || job.description

Copy link
Member Author

@RaduBerinde RaduBerinde left a comment

Choose a reason for hiding this comment

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

Updated to add the command column to SHOW JOBS as well. CC @knz

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @vilterp)

@RaduBerinde
Copy link
Member Author

Docs for SHOW JOBS will need to be updated with the command column (it shows the internal SQL command, unless it's the same with the description).

@knz
Copy link
Contributor

knz commented Mar 6, 2019

The code and overall change LGTM.

I do have an issue with the word "command" though. You are introducing a new word without precedent throughout our product. Because you do that we'll have to handle a new type of question: "what's the difference between a command and a SQL statement?"

In my opinion, until jobs can be defined to do more things than SQL, we should not use a new word. The word "Statement" or "Query" would be fine.

@RaduBerinde
Copy link
Member Author

I used command because that's what the UI shows in the expanded job view. I can change to statement.

@knz
Copy link
Contributor

knz commented Mar 6, 2019

Unless there was a good reason to choose "command" originally (I don't recall such a reason, but perhaps @piyush-singh or @vilterp recall), I'd recommend changing it yes.

This change adds a `Statement` field to `jobspb.Payload` (and a
corresponding `statement` column to `crdb_internal.jobs` and
`SHOW JOBS`). The stats job now shows the internal statement in the
expanded job view. If the statement isn't present, the description is
assumed to be the command.

Release note (sql change): SHOW JOBS now returns an extra `statement`
column which is populated when the description is not the statement.
@RaduBerinde
Copy link
Member Author

Done - renamed to "statement" everywhere. @vilterp let me know if the UI change is ok with you.

Copy link
Collaborator

@celiala celiala left a comment

Choose a reason for hiding this comment

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

:lgtm:

Synced with @piyush-singh - 👍on using Statement over Command.

@RaduBerinde
Copy link
Member Author

Thank you!

bors r+

@craig
Copy link
Contributor

craig bot commented Mar 7, 2019

Build failed (retrying...)

craig bot pushed a commit that referenced this pull request Mar 7, 2019
35439: jobs: separate description from command r=RaduBerinde a=RaduBerinde

This change adds a `Command` field to `jobspb.Payload` (and a
corresponding `command` column to `crdb_internal.jobs`). The stats job
now shows the internal command in the expanded job view. If the
command isn't present, the description is assumed to be the command.

Release note: None

Example:
![image](https://user-images.githubusercontent.com/16544120/53844871-16ef0f00-3f75-11e9-8a3c-6f4c4fe180a9.png)


Co-authored-by: Radu Berinde <radu@cockroachlabs.com>
@craig
Copy link
Contributor

craig bot commented Mar 7, 2019

Build succeeded

@craig craig bot merged commit f2c15e6 into cockroachdb:master Mar 7, 2019
celiala added a commit to celiala/cockroach that referenced this pull request Mar 12, 2019
In cockroachdb#35439, we introduced a user-friendly message (instead of the
exact SQL statement) for automatic table stats.

This commit uses the default font for that message, reserving
the monospace font for just SQL text.

Release note: None
@RaduBerinde RaduBerinde deleted the event-command branch March 12, 2019 18:12
celiala added a commit to celiala/cockroach that referenced this pull request Mar 12, 2019
In cockroachdb#35439, we introduced a user-friendly message (instead of the
exact SQL statement) for automatic table stats.

This commit uses the default font for that message, reserving
the monospace font for just SQL text.

Release note: None
craig bot pushed a commit that referenced this pull request Mar 12, 2019
35607: roachtest: Renenable SQLSmith roachtest r=BramGruneir a=BramGruneir

Note that this is the original roachtest and not the re-written one.  If we find
that this one does not find any different issues, we should remove it entirely.
But there is no harm in enabling it right now.

Release note: None

35623: storage: enable follower_reads by default r=ajwerner a=ajwerner

This PR enables storage level follower reads by default. Follower reads still
will not be used for request routing without an enterprise license.

Release note: None

35645: sql/sqlbase: fix TestEncDatumSize under go1.12 r=knz a=petermattis

Fixes #35636.

golang/go@bfc54bb
reduced the memory usage of small big integers which in turn reduced the
`EncDatum.Size()` for the decimal datum used in this test.

Release note: None

35652: ui: remove monospace font for human-readable job description r=celiala a=celiala

In #35439, we introduced a user-friendly message (instead of the
exact SQL statement) for automatic table stats.

This commit uses the default font for that message, reserving
the monospace font for just SQL text.

cc @rolandcrosby @piyush-singh

![image](https://user-images.githubusercontent.com/3051672/54228134-e27cd500-44d7-11e9-8272-70da6ca7315c.png)


35654: roachtest: two easy changefeed test fixes r=nvanbenschoten a=danhhz

See commits for details

Co-authored-by: Bram Gruneir <bram@cockroachlabs.com>
Co-authored-by: Andrew Werner <ajwerner@cockroachlabs.com>
Co-authored-by: Peter Mattis <petermattis@gmail.com>
Co-authored-by: Celia La <celia@cockroachlabs.com>
Co-authored-by: Daniel Harrison <daniel.harrison@gmail.com>
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.

5 participants