You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some Pro features add high churn tables that would benefit from the
reindexer. As of now, however, there's no way to extend it to run on
anything but the default index list.
Add `Config.ReindexerIndexNames` so callers can provide the exact list
to reindex, and export `ReindexerIndexNamesDefault()` so integrations
can start from the built-in targets without reaching into internal
maintenance code.
Thread the configured names into `maintenance.Reindexer` and filter
them through `IndexesExist` before starting work. That lets
mixed-version or partially migrated installs skip absent indexes
instead of trying to rebuild objects that are not there. Preserve
the `nil` versus non-`nil` contract in `WithDefaults` by copying the
slice without collapsing an explicit empty override back to `nil`, so
`[]string{}` still means "reindex nothing".
When `IndexesExist` fails during reindex discovery, advance the next
scheduled run before resetting the timer. The old code reset against
the already-fired `nextRunAt`, which made `time.Until(nextRunAt)`
zero or negative and caused immediate retries in a tight error loop.
Scheduling from the prior run time preserves the configured cadence
after transient discovery failures. The added tests cover the exported
default list, exact override propagation, explicit empty overrides,
missing-index filtering, and the discovery-error retry path.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [Unreleased]
9
9
10
+
### Added
11
+
12
+
- Added `Config.ReindexerIndexNames` and `ReindexerIndexNamesDefault()` so the reindexer's target indexes can be customized from the public API. [PR #1194](https://github.com/riverqueue/river/pull/1194).
13
+
10
14
### Changed
11
15
12
16
- Jobs erroring or panicking no longer logs at the error/warn level because this is not indicative of a problem inside of River itself. These log statements have been demoted to info. [PR #1190](https://github.com/riverqueue/river/pull/1190).
0 commit comments