Skip to content

Commit

Permalink
effectively disable reindexer (#34)
Browse files Browse the repository at this point in the history
At this time, we're not sure we want to have a reindexer process
automatically running. It could be a net negative for many use cases and
we may want to do further work to avoid its potential downsides. For
now, disable it by simply removing all the indexes from its default
index list.
  • Loading branch information
bgentry authored Nov 18, 2023
1 parent c9bbfb2 commit 3241547
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1310,6 +1310,7 @@ func Test_Client_Maintenance(t *testing.T) {

t.Run("Reindexer", func(t *testing.T) {
t.Parallel()
t.Skip("Reindexer is disabled for further development")

config := newTestConfig(t, nil)
config.ReindexerSchedule = cron.Every(time.Second)
Expand Down
5 changes: 1 addition & 4 deletions internal/maintenance/reindexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const (
DefaultTimeout = 15 * time.Second
)

var defaultIndexNames = []string{"river_job_metadata_index", "river_job_args_index"} //nolint:gochecknoglobals
var defaultIndexNames = []string{} //nolint:gochecknoglobals

// Test-only properties.
type ReindexerTestSignals struct {
Expand All @@ -43,9 +43,6 @@ type ReindexerConfig struct {
}

func (c *ReindexerConfig) mustValidate() *ReindexerConfig {
if len(c.IndexNames) < 1 {
panic("ReindexerConfig.IndexNames must have at least one entry")
}
if c.ScheduleFunc == nil {
panic("ReindexerConfig.ScheduleFunc must be set")
}
Expand Down

0 comments on commit 3241547

Please sign in to comment.