diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-12-13 15:07:11 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-12-13 15:07:17 +0100 |
commit | 767c012665953557ad02f731a84c6d10907a46af (patch) | |
tree | 57721f5c1120e3bbd954643b59b1cc942fe2cb59 /test | |
parent | bf66e258a84e18935fde3ebb9a4b0392bf883222 (diff) | |
parent | 50209a42ad05e92ad0945fa104c65d2b1f2a2c1c (diff) | |
download | bitcoin-767c012665953557ad02f731a84c6d10907a46af.tar.xz |
Merge bitcoin/bitcoin#23738: validation, log: improve logging of ChainstateManager snapshot persistance
50209a42ad05e92ad0945fa104c65d2b1f2a2c1c validation, doc: remove TODO comment (Jon Atack)
8e37fa83934ad47a4a73c326213e2073dfc35e29 validation, log: improve logging in FlushSnapshotToDisk() (Jon Atack)
271252c0bda5779a255f23a73ceb6f722559f0d1 validation, log: extract FlushSnapshotToDisk() function (Jon Atack)
Pull request description:
Use the `LOG_TIME_MILLIS_WITH_CATEGORY_MSG_ONCE` macro to improve the logging of ChainstateManager snapshot persistance, log task start and completion separately and no longer manually track the duration, as suggested by Marco Falke in https://github.com/bitcoin/bitcoin/pull/22872#discussion_r715571280.
Extract the flushing into one function, which clarifies the logic, extends the improved logging to both flushing call sites, and allows logging the prefix `FlushSnapshotToDisk`, which is similar to `FlushStateToDisk`.
before
```
[snapshot] flushing coins cache (0 MB)... done (0.00ms)
[snapshot] flushing snapshot chainstate to disk
```
after
```
FlushSnapshotToDisk: flushing coins cache (0 MB) started
...
FlushSnapshotToDisk: completed (0.00ms)
FlushSnapshotToDisk: saving snapshot chainstate (0 MB) started
...
FlushSnapshotToDisk: completed (0.00ms)
```
The logging can be observed in the output of
```
./src/test/test_bitcoin -t validation_chainstate_tests -- DEBUG_LOG_OUT
```
Top commit has no ACKs.
Tree-SHA512: 5d954cd8c7455f8625152a43663a237f04717bb834aed62925a56e17c711fca6ccfc03783970b6b0bde44f64617d804b423a7048287c06ee816db36247acf272
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions