Skip to content

Refactor TrieLogPruner preload timeout to be more testable#7393

Merged
siladu merged 5 commits intobesu-eth:mainfrom
siladu:trie-log-async-preload-future
Jul 30, 2024
Merged

Refactor TrieLogPruner preload timeout to be more testable#7393
siladu merged 5 commits intobesu-eth:mainfrom
siladu:trie-log-async-preload-future

Conversation

@siladu
Copy link
Copy Markdown
Contributor

@siladu siladu commented Jul 29, 2024

An improved version of #7365

Example of INFO level logging during timeout...

{"@timestamp":"2024-07-29T11:58:49,398","level":"INFO","thread":"main","class":"TrieLogPruner","message":"Trie log pruner queue preload starting...","throwable":""}
{"@timestamp":"2024-07-29T11:58:49,399","level":"INFO","thread":"main","class":"TrieLogPruner","message":"Attempting to load first 5000 trie logs from database...","throwable":""}
{"@timestamp":"2024-07-29T11:58:49,400","level":"INFO","thread":"main","class":"TrieLogPruner","message":"Trie log pruning will timeout after 30 seconds. If this is timing out, consider using `besu storage trie-log prune` subcommand, see https://besu.hyperledger.org/public-networks/how-to/bonsai-limit-trie-logs","throwable":""}
{"@timestamp":"2024-07-29T11:59:19,401","level":"WARN","thread":"main","class":"TrieLogPruner","message":"Timeout occurred while loading and processing 5000 trie logs from database","throwable":""}
{"@timestamp":"2024-07-29T11:59:19,437","level":"INFO","thread":"pool-8-thread-1","class":"TrieLogPruner","message":"Operation interrupted, but will attempt to prune what's in the queue so far...","throwable":""}
{"@timestamp":"2024-07-29T11:59:19,452","level":"INFO","thread":"pool-8-thread-1","class":"TrieLogPruner","message":"...pruned 412 trie logs","throwable":""}
{"@timestamp":"2024-07-29T11:59:19,452","level":"INFO","thread":"main","class":"TrieLogPruner","message":"Trie log pruner queue preload complete.","throwable":""}

Fixed Issue(s)

Thanks for sending a pull request! Have you done the following?

  • Checked out our contribution guidelines?
  • Considered documentation and added the doc-change-required label to this PR if updates are required.
  • Considered the changelog and included an update if required.
  • For database changes (e.g. KeyValueSegmentIdentifier) considered compatibility and performed forwards and backwards compatibility tests

Locally, you can run these tests to catch failures early:

  • unit tests: ./gradlew build
  • acceptance tests: ./gradlew acceptanceTest
  • integration tests: ./gradlew integrationTest
  • reference tests: ./gradlew ethereum:referenceTests:referenceTests

Signed-off-by: Simon Dudley simon.dudley@consensys.net

siladu added 4 commits July 29, 2024 19:37
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Copy link
Copy Markdown
Contributor

@fab-10 fab-10 left a comment

Choose a reason for hiding this comment

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

you could also have used EthScheduler that has support for testing

@siladu siladu enabled auto-merge (squash) July 30, 2024 06:30
@siladu siladu merged commit ec8429f into besu-eth:main Jul 30, 2024
@siladu siladu deleted the trie-log-async-preload-future branch July 30, 2024 07:20
gconnect pushed a commit to gconnect/besu that referenced this pull request Aug 26, 2024
…7393)

Also update logging

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: gconnect <agatevureglory@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants