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

"Processed Ledger" logged twice during resume state #5152

Closed
tamirms opened this issue Jan 5, 2024 · 2 comments
Closed

"Processed Ledger" logged twice during resume state #5152

tamirms opened this issue Jan 5, 2024 · 2 comments
Assignees
Labels
bug horizon ingest New ingestion system performance issues aimed at improving performance

Comments

@tamirms
Copy link
Contributor

tamirms commented Jan 5, 2024

In the release-horizon-v2.28.0 branch, the "Processed Ledger" message is logged twice whenever a ledger is ingested in the resume state:

  1. https://github.com/stellar/go/blob/release-horizon-v2.28.0/services/horizon/internal/ingest/fsm.go#L560
  2. https://github.com/stellar/go/blob/release-horizon-v2.28.0/services/horizon/internal/ingest/processor_runner.go#L356

The first case includes a duration field which measures the total time to ingest the ledger through all the processors.
The second case also includes a duration field, however, that field only measures the time to run the transaction processors.

We should only be logging the first case during resume state ingestion. This bug was introduced in #5117

In 2.27.0 we never logged the "Processed Ledger" message in processor runner:

https://github.com/stellar/go/blob/release-horizon-v2.27.0/services/horizon/internal/ingest/processor_runner.go

The "Processed Ledger" message was logged only in fsm during the resume state and the other states which only reingested history. We should fix this bug and ensure that "Processed Ledger" is only logged once per ledger in every state of the fsm (resume, reingest history, etc)

@tamirms tamirms added the bug label Jan 5, 2024
@mollykarcher mollykarcher added horizon performance issues aimed at improving performance labels Jan 5, 2024
sreuland added a commit to sreuland/go that referenced this issue Jan 8, 2024
…dger to be different phrase to avoid conflict with existing 'Processed ledger' log output from fsm
@sreuland sreuland self-assigned this Jan 8, 2024
@sreuland
Copy link
Contributor

sreuland commented Jan 8, 2024

#5155

@sreuland sreuland added the ingest New ingestion system label Jan 8, 2024
sreuland added a commit that referenced this issue Jan 8, 2024
… be different phrase to avoid conflict with existing 'Processed ledger' log output from fsm (#5155)
@sreuland
Copy link
Contributor

sreuland commented Jan 8, 2024

merged

@sreuland sreuland closed this as completed Jan 8, 2024
sreuland added a commit to sreuland/go that referenced this issue Jan 29, 2024
…dger to be different phrase to avoid conflict with existing 'Processed ledger' log output from fsm (stellar#5155)
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 performance issues aimed at improving performance
Projects
Status: Done
Development

No branches or pull requests

3 participants