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

Additional log to indicate that database is compacting #5359

Merged
merged 4 commits into from
Apr 20, 2023

Conversation

daniellehrner
Copy link
Contributor

When Besu is restarted after running for a few days the startup can appear to be stuck:

2023-04-18 08:42:06.806+00:00 | main | INFO  | RocksDBKeyValueStorageFactory | Existing database detected at /var/lib/besu. Version 2
2023-04-18 08:42:18.872+00:00 | main | INFO  | KeyPairUtil | Loaded public key 0x52e86b0e8c9cdd6579493a5371206946ef8442ee3b4b3144e1d1de1a8ed5ec6d41cfc977717b9358d1c403b915bbc9f8a1befabd71974a4f5ee7eda64a003a11 from /var/lib/besu/key

The example above shows a 12 seconds difference between the two log messages. In other occasions I've seen it taking longer than 30 seconds. Looking at Grafana it seems that the database is compacting during this time:

Screenshot 2023-04-18 at 11 07 44

This PR adds this information to the log message to tell the user what is going on, so they don´t think that there is a problem.

…when opening an existing one.

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
@github-actions
Copy link

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.
  • I have considered running ./gradlew acceptanceTestNonMainnet locally if my PR affects non-mainnet modules.
  • I thought about the changelog and included a changelog update if required.
  • If my PR includes database changes (e.g. KeyValueSegmentIdentifier) I have thought about compatibility and performed forwards and backwards compatibility tests

Copy link
Contributor

@non-fungible-nelson non-fungible-nelson left a comment

Choose a reason for hiding this comment

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

LGTM! Great catch

Copy link
Contributor

@garyschulte garyschulte left a comment

Choose a reason for hiding this comment

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

LGTM, spotless notwithstanding

@non-fungible-nelson
Copy link
Contributor

@daniellehrner can you handle a merge by friday?

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
@macfarla macfarla enabled auto-merge (squash) April 20, 2023 18:38
@macfarla macfarla merged commit 57b5198 into hyperledger:main Apr 20, 2023
elenduuche pushed a commit to elenduuche/besu that referenced this pull request Aug 16, 2023
…when opening an existing one. (hyperledger#5359)

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
eum602 pushed a commit to lacchain/besu that referenced this pull request Nov 3, 2023
…when opening an existing one. (hyperledger#5359)

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants