Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

SCP-3431: Better syncing logging in the chain-index. #309

Merged
merged 1 commit into from
Feb 14, 2022
Merged

Conversation

koslambrou
Copy link
Contributor

@koslambrou koslambrou commented Feb 9, 2022

Summary of changes:

  • Syncing message now logs every 30s

  • Prints syncing percentage, number of applied blocks, number of rollbacks and current tip

  • Logging uses the Trace for more consistent logging with PAB and cardano-node.

  • Added warning flag for missing import list

Example of new chain-index logging (the number shown are not the actual values):

[chain-index:Warning:30] [2022-02-09 13:59:51.71 UTC] No synced blocks in the last 30s.
[chain-index:Info:30] [2022-02-09 13:59:54.71 UTC] Syncing (7.38%). Applied 7 blocks, 1 rollbacks in the last 30s. Current tip is Point(Slot 3898564, BlockId 93e58766e4ab743ea07d5f2a070cb9c3e7b95db160d04203c4764fb1050d422d)
[chain-index:Info:30] [2022-02-09 13:59:57.72 UTC] Syncing (7.38%). Applied 67 blocks, 0 rollbacks in the last 30s. Current tip is Point(Slot 3898572, BlockId 1df9f2d8967be312bdadef8649e0738101c5660096343c17d4ca1a34b66f7f59)
[chain-index:Warning:30] [2022-02-09 14:01:24.80 UTC] No synced blocks in the last 30s.
[chain-index:Error:34] [2022-02-09 14:01:47.22 UTC] ChainIndexError: Error during Beam operation: SqlError (via Beam): SQLite3 returned ErrorMisuse while attempting to perform prepare "ROLLBACK TRANSACTION": bad parameter or other API misuse

Pre-submit checklist:

  • Branch
    • Tests are provided (if possible)
    • Commit sequence broadly makes sense
    • Key commits have useful messages
    • Relevant tickets are mentioned in commit messages
    • Formatting, materialized Nix files, PNG optimization, etc. are updated
  • PR
    • Self-reviewed the diff
    • Useful pull request description
    • Reviewer requested

* Syncing message now logs every 30s.

* Prints syncing percentage, number of applied blocks, number of rollbacks and current tip

* Logging uses the Trace for more consistent logging with PAB and cardano-node.
Copy link
Contributor

@sjoerdvisscher sjoerdvisscher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants