Commit 0cb73bee authored by Suleimi Ahmed's avatar Suleimi Ahmed 🔴
Browse files

feat(datastore): use db replica for bbm progress metric query

parent ba6cafb2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2370,7 +2370,7 @@ func (app *App) initializeBBMProgressCollector(config *configuration.Configurati

	// Executor returning rows for scanning
	executor := func(ctx context.Context) ([]*models.BackgroundMigrationProgress, error) {
		return datastore.NewBackgroundMigrationStore(app.db.Primary()).Progress(ctx)
		return datastore.NewBackgroundMigrationStore(app.db.Replica(ctx)).Progress(ctx)
	}

	var pOpts []dsmetrics.ProgressOption