Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Resuming an already unpaused queue is now fully an no-op, and won't touch the row's `updated_at` like it (unintentionally) did before. [PR #870](https://github.com/riverqueue/river/pull/870).
- Suppress an error log line from the producer that may occur on normal shutdown when operating in poll-only mode. [PR #896](https://github.com/riverqueue/river/pull/896).
- Added missing help documentation for CLI command `river migrate-list`. [PR #903](https://github.com/riverqueue/river/pull/903).
- Correct handling an explicit schema in the reindexer maintenance service. [PR #916](https://github.com/riverqueue/river/pull/916).

## [0.22.0] - 2025-05-10

Expand Down
2 changes: 1 addition & 1 deletion internal/maintenance/reindexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func (s *Reindexer) reindexOne(ctx context.Context, indexName string) error {

var maybeSchema string
if s.Config.Schema != "" {
maybeSchema = "." + s.Config.Schema
maybeSchema = s.Config.Schema + "."
}

_, err := s.exec.Exec(ctx, "REINDEX INDEX CONCURRENTLY "+maybeSchema+indexName)
Expand Down
10 changes: 10 additions & 0 deletions internal/maintenance/reindexer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,16 @@ func TestReindexer(t *testing.T) {
startstoptest.Stress(ctx, t, svc)
})

t.Run("ReindexesOne", func(t *testing.T) {
t.Parallel()

svc, _ := setup(t)

for _, indexName := range svc.Config.IndexNames {
require.NoError(t, svc.reindexOne(ctx, indexName))
}
})

t.Run("ReindexesEachIndex", func(t *testing.T) {
t.Parallel()

Expand Down
Loading