ganymede
ganymede copied to clipboard
build(deps): bump github.com/riverqueue/river from 0.11.4 to 0.12.1
Bumps github.com/riverqueue/river from 0.11.4 to 0.12.1.
Release notes
Sourced from github.com/riverqueue/river's releases.
v0.12.1
Changed
- The
BatchCompleter
that marks jobs as completed can now batch database updates for all states of jobs that have finished execution. Prior to this change, onlycompleted
jobs were batched into a singleUPDATE
call, while jobs moving to any other state used a singleUPDATE
per job. This change should significantly reduce database and pool contention on high volume system when jobs get retried, snoozed, cancelled, or discarded following execution. [PR #617](riverqueue/river#617).Fixed
- Unique job changes from v0.12.0 / [PR #590](riverqueue/river#590) introduced a bug with scheduled or retryable unique jobs where they could be considered in conflict with themselves and moved to
discarded
by mistake. There was also a possibility of a broken job scheduler if duplicateretryable
unique jobs were attempted to be scheduled at the same time. The job scheduling query was corrected to address these issues along with missing test coverage. [PR #619](riverqueue/river#619).v0.12.0
⚠️ Version 0.12.0 contains a new database migration, version 6. See documentation on running River migrations. If migrating with the CLI, make sure to update it to its latest version:
go install github.com/riverqueue/river/cmd/river@latest river migrate-up --database-url "$DATABASE_URL"
If not using River's internal migration system, the raw SQL can alternatively be dumped with:
go install github.com/riverqueue/river/cmd/river@latest river migrate-get --version 6 --up > river6.up.sql river migrate-get --version 6 --down > river6.down.sql
The migration includes a new index. Users with a very large job table may want to consider raising the index separately using
CONCURRENTLY
(which must be run outside of a transaction), then runriver migrate-up
to finalize the process (it will tolerate an index that already exists):ALTER TABLE river_job ADD COLUMN unique_states BIT(8);
CREATE UNIQUE INDEX CONCURRENTLY river_job_unique_idx ON river_job (unique_key) WHERE unique_key IS NOT NULL AND unique_states IS NOT NULL AND river_job_state_in_bitmask(unique_states, state);
go install github.com/riverqueue/river/cmd/river@latest river migrate-up --database-url "$DATABASE_URL"
Added
rivertest.WorkContext
, a test function that can be used to initialize a context to test aJobArgs.Work
implementation that will have a client set to context for use withriver.ClientFromContext
. [PR #526](riverqueue/river#526).- A new
river migrate-list
command is available which lists available migrations and which version a target database is migrated to. [PR #534](riverqueue/river#534).river version
orriver --version
now prints River version information. [PR #537](riverqueue/river#537).Config.JobCleanerTimeout
was added to allow configuration of the job cleaner query timeout. In some deployments with millions of stale jobs, the cleaner may not be able to complete its query within the default 30 seconds.Changed
... (truncated)
Changelog
Sourced from github.com/riverqueue/river's changelog.
[0.12.1] - 2024-09-26
Changed
- The
BatchCompleter
that marks jobs as completed can now batch database updates for all states of jobs that have finished execution. Prior to this change, onlycompleted
jobs were batched into a singleUPDATE
call, while jobs moving to any other state used a singleUPDATE
per job. This change should significantly reduce database and pool contention on high volume system when jobs get retried, snoozed, cancelled, or discarded following execution. [PR #617](riverqueue/river#617).Fixed
- Unique job changes from v0.12.0 / [PR #590](riverqueue/river#590) introduced a bug with scheduled or retryable unique jobs where they could be considered in conflict with themselves and moved to
discarded
by mistake. There was also a possibility of a broken job scheduler if duplicateretryable
unique jobs were attempted to be scheduled at the same time. The job scheduling query was corrected to address these issues along with missing test coverage. [PR #619](riverqueue/river#619).[0.12.0] - 2024-09-23
⚠️ Version 0.12.0 contains a new database migration, version 6. See documentation on running River migrations. If migrating with the CLI, make sure to update it to its latest version:
go install github.com/riverqueue/river/cmd/river@latest river migrate-up --database-url "$DATABASE_URL"
If not using River's internal migration system, the raw SQL can alternatively be dumped with:
go install github.com/riverqueue/river/cmd/river@latest river migrate-get --version 6 --up > river6.up.sql river migrate-get --version 6 --down > river6.down.sql
The migration includes a new index. Users with a very large job table may want to consider raising the index separately using
CONCURRENTLY
(which must be run outside of a transaction), then runriver migrate-up
to finalize the process (it will tolerate an index that already exists):ALTER TABLE river_job ADD COLUMN unique_states BIT(8);
CREATE UNIQUE INDEX CONCURRENTLY river_job_unique_idx ON river_job (unique_key) WHERE unique_key IS NOT NULL AND unique_states IS NOT NULL AND river_job_state_in_bitmask(unique_states, state);
go install github.com/riverqueue/river/cmd/river@latest river migrate-up --database-url "$DATABASE_URL"
Added
rivertest.WorkContext
, a test function that can be used to initialize a context to test aJobArgs.Work
implementation that will have a client set to context for use withriver.ClientFromContext
. [PR #526](riverqueue/river#526).- A new
river migrate-list
command is available which lists available migrations and which version a target database is migrated to. [PR #534](riverqueue/river#534).river version
orriver --version
now prints River version information. [PR #537](riverqueue/river#537).Config.JobCleanerTimeout
was added to allow configuration of the job cleaner query timeout. In some deployments with millions of stale jobs, the cleaner may not be able to complete its query within the default 30 seconds.
... (truncated)
Commits
bb8997e
prepare v0.12.1 (#620)2b9dd83
Fix unique scheduling issues (#619)bd43738
BatchCompleter: batch all ops, not just completed (#617)e9b751f
run make tidy (#613)5e35335
prepare cmd/river v0.12.0 (#612)b0866b6
prepare v0.12.0 (#611)9be1d11
unify all bulk inserts to a single code path (#610)185dbb8
InsertManyFast doc fixes for uniqueness (#609)18bcb34
prepare cmd/river/v0.12.0-rc.1 (#608)84c531b
prepare v0.12.0-rc.1 (#607)- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
-
@dependabot rebase
will rebase this PR -
@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it -
@dependabot merge
will merge this PR after your CI passes on it -
@dependabot squash and merge
will squash and merge this PR after your CI passes on it -
@dependabot cancel merge
will cancel a previously requested merge and block automerging -
@dependabot reopen
will reopen this PR if it is closed -
@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually -
@dependabot show <dependency name> ignore conditions
will show all of the ignore conditions of the specified dependency -
@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)