Skip to content

Commit ce6decd

Browse files
author
Gleez Technologies
committed
Minor changes
1 parent 32a1881 commit ce6decd

File tree

2 files changed

+8
-19
lines changed

2 files changed

+8
-19
lines changed

river/river.go

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -190,32 +190,20 @@ func (r *River) run() error {
190190
r.sphinxService.WaitUntilStarted()
191191
}
192192

193+
err = r.sphinxService.LoadSyncState(r.master.syncState())
194+
if err != nil {
195+
r.l.Errorf("one or more manticore backends are not up to date: %v", err)
196+
return errors.Trace(err)
197+
}
198+
193199
b := &backoff.Backoff{
194200
Min: 1 * time.Second,
195-
Max: 10 * time.Minute,
201+
Max: 5 * time.Minute,
196202
Factor: 2,
197203
Jitter: true,
198204
}
199205
defer b.Reset()
200206

201-
// // get master state - wait until get state or timeout
202-
// for {
203-
// time.Sleep(b.Duration())
204-
205-
// err = r.sphinxService.LoadSyncState(r.master.syncState())
206-
// if err == nil {
207-
// b.Reset()
208-
// r.l.Infof("Connected to manticore backend")
209-
// break
210-
// }
211-
// }
212-
213-
err = r.sphinxService.LoadSyncState(r.master.syncState())
214-
if err != nil {
215-
r.l.Errorf("one or more manticore backends are not up to date: %v", err)
216-
return errors.Trace(err)
217-
}
218-
219207
// check indexes are ready - wait until ready or timeout
220208
for {
221209
time.Sleep(b.Duration())

river/status.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ func handleStartSync(r *River) http.HandlerFunc {
311311

312312
r.l.Infof("reset GTID after successful restart to: %s", r.master.gtidSet())
313313
r.startSyncRoutine()
314+
314315
w.WriteHeader(http.StatusNoContent)
315316
})
316317
}

0 commit comments

Comments
 (0)