Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

services/horizon: Resume ingestion immediately when catching up #4196

Merged
merged 2 commits into from
Jan 28, 2022
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
5 changes: 2 additions & 3 deletions services/horizon/internal/ingest/fsm.go
Original file line number Diff line number Diff line change
Expand Up @@ -424,9 +424,8 @@ func (r resumeState) run(s *system) (transition, error) {
log.WithError(err).Warn("error updating stellar-core cursor")
}

return retryResume(resumeState{
latestSuccessfullyProcessedLedger: lastIngestedLedger,
}), nil
// resume immediately so Captive-Core catchup is not slowed down
return resumeImmediately(lastIngestedLedger), nil
}

ingestVersion, err := s.historyQ.GetIngestVersion(s.ctx)
Expand Down
2 changes: 1 addition & 1 deletion services/horizon/internal/ingest/resume_state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ func (s *ResumeTestTestSuite) TestBumpIngestLedger() {
s.Assert().Equal(
transition{
node: resumeState{latestSuccessfullyProcessedLedger: 101},
sleepDuration: defaultSleep,
sleepDuration: 0,
},
next,
)
Expand Down