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

CaptiveCoreBackend.isClosed can be confused with isPrepared #3705

Closed
bartekn opened this issue Jun 17, 2021 · 0 comments · Fixed by #4088
Closed

CaptiveCoreBackend.isClosed can be confused with isPrepared #3705

bartekn opened this issue Jun 17, 2021 · 0 comments · Fixed by #4088
Assignees
Labels
bug horizon ingest New ingestion system

Comments

@bartekn
Copy link
Contributor

bartekn commented Jun 17, 2021

What version are you using?

2.4.1

What did you do?

While working on #3694 I noticed that CaptiveCoreBackend.isClosed is confused with CaptiveCoreBackend.isPrepared. When CaptiveCoreBackend is closed by Close() call it can't be reused because internal ctx is cancelled and ledgerHashStore is closed however we often check isClosed() and the print an error saying: session is closed, call PrepareRange first.

What did you see instead?

I think what we should do is perform two checks:

  • Check isClosed() - then prevent from using the CaptiveCoreBackend - PrepareRange and GetLedger should error.
  • Check isPrepared() - if it's not return an error asking to prepare the range again.
@bartekn bartekn added ingest New ingestion system bug labels Jun 17, 2021
@erika-sdf erika-sdf self-assigned this Nov 12, 2021
@paulbellamy paulbellamy self-assigned this Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug horizon ingest New ingestion system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants