jobs: enhance the InfoStorage API#98993
Conversation
f7206e3 to
b996ef6
Compare
adityamaru
left a comment
There was a problem hiding this comment.
Thanks for doing this, just a couple of non-blocking comments!
| infoStorage := job2.InfoStorage(txn) | ||
| return infoStorage.GetLast(ctx, kPrefix, func(key, value []byte) error { | ||
| i++ | ||
| require.Equal(t, key, kC) |
There was a problem hiding this comment.
I think kC only has one revision, could we write a few more revisions before iterating?
| var iterConfig string | ||
| switch iterMode { | ||
| case iterateAll: | ||
| iterConfig = `ORDER BY info_key ASC, written DESC` // with no LIMIT. |
There was a problem hiding this comment.
given that for a job_id there will only ever be one row per info_key we could drop the secondary sort on written, right?
Release note: None
Release note: None
Release note: None
Release note: None
b996ef6 to
220083b
Compare
knz
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @adityamaru)
pkg/jobs/job_info_storage.go line 161 at r3 (raw file):
Previously, adityamaru (Aditya Maru) wrote…
given that for a job_id there will only ever be one row per
info_keywe could drop the secondary sort on written, right?
Discussed internally here https://cockroachlabs.slack.com/archives/C01RX2G8LT1/p1679345511855089 - in summary it doesn't matter here.
I'm going to keep it with an explanatory comment.
pkg/jobs/job_info_storage_test.go line 162 at r3 (raw file):
Previously, adityamaru (Aditya Maru) wrote…
I think
kConly has one revision, could we write a few more revisions before iterating?
Done.
|
TFYR! bors r=adityamaru |
|
Build failed (retrying...): |
|
Build failed (retrying...): |
|
Build succeeded: |
98459: server,autoconfig: automatic configuration via config tasks r=adityamaru a=knz Epic: CRDB-23559 Informs #98431. All commits but the last are from #98993. This change introduces "auto config tasks", a mechanism through which configuration payloads ("tasks") can be injected into a running SQL service. This is driven via the "auto config runner" job that was introduced in the previous commit. The job listens for the arrival of new task definitions via a `Provider` interface. When new tasks are known, and previous tasks have completed, the runner creates a job for the first next task. Release note: None 100476: server/drain: shut down SQL subsystems gracefully before releasing table leases r=JeffSwenson,rytaft a=knz Needed for #99941 and #99958. Epic: CRDB-23559 See individual commits for details. 100511: sqlccl: deflake TestGCTenantJobWaitsForProtectedTimestamps r=adityamaru,arulajmani a=knz Fixes #94808 The tenant server must be shut down before the tenant record is removed; otherwise the tenant's SQL server will self-terminate by calling Stop() on its stopper, which in this case was shared with the parent cluster. Release note: None Co-authored-by: Raphael 'kena' Poss <knz@thaumogen.net>
|
blathers backport 23.1 |
|
Encountered an error creating backports. Some common things that can go wrong:
You might need to create your backport manually using the backport tool. error creating merge commit from fa90381 to blathers/backport-release-23.1-98993: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch 23.1 failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
Needed for #98459.
Epic: CRDB-23559