- Drop tables
river_clientandriver_client_queue. These were added prospectively, but in the end were never used for anything. PR #1115. - Add a default value of 25 to
river_job.max_attempts. Go code was previously injecting a max value, so this has no functional effect on existing behavior. PR #1115. - Add a default value of
CURRENT_TIMESTAMPtoriver_queue.updated_at. Go code was previously injecting the current time, so this has no functional effect on existing behavior. PR #1115. - SQLite only: Convert
jsoncolumns tojsonb. PR #1224. - SQLite only: Add pseudo listen/notify mechanism in a new
river_notificationtable. PR #1275.
For SQLite, running River apps must be stopped briefly while the migration is run and their code upgrade to 0.40.0 so they start reading and inserting new values in jsonb instead of json.
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 (or change --database-url to a Postgres URI for Postgres versions):
go install github.com/riverqueue/river/cmd/river@latest
river migrate-get --database-url sqlite:// --version 7 --up > river7.up.sql
river migrate-get --database-url sqlite:// --version 7 --down > river7.down.sqlAdded
- SQLite picks up a new
river_notificationtable that allows River to provide listen/notify-like functionality despite these functions not being supported outside of Postgres. PR #1275. - Added
JobStuckHandler, giving clients a hook to handle "stuck" jobs (i.e. ones which are passed timeout and haven't responded to context cancellation) and potentially open a new worker slot if so desired. PR #1291.
Changed
- Convert SQLite JSON columns to JSONB (including migration). PR #1224.
- Change SQLite driver operations over to use bulk inserts where possible now that sqlc has better support for
json_each. PR #1276 - Detect duplicate step names across
river.ResumableStepand return a validation error. PR #1281 - Earlier backpressure from
BatchCompleterwhen it's throughput is saturated with fewer warnings to console. PR #1292 - Series of minor optimizations in
BatchCompleterraising throughput ~20% when it's the bottleneck in job processing (e.g. in benchmarks). PR #1293
Fixed
- Fix
JobCancelhaving no effect on running jobs when using a poll-only driver (e.g.riverdatabasesql). ThecontrolActionCancelevent was silently dropped infetchAndRunLoop'squeueControlChhandler instead of being forwarded tomaybeCancelJob. Note: this fix only works within a single process; cross-process cancels in poll-only setups must wait for the next poll cycle. PR #1245. - Ensure jobs that return a custom timeout of -1 (no timeout) are never rescued. PR #1288.
- Detect numbered PostgreSQL
REINDEX INDEX CONCURRENTLYartifacts like_ccnew1and_ccold2so the reindexer does not keep accumulating failed artifact indexes. Fixes #1296. PR #1297.