Skip to content

Conversation

maflcko
Copy link
Member

@maflcko maflcko commented Apr 27, 2020

Can be tested by calling -reindex or -loadblock and then pressing CTRL+C.

Should print something like:

...
2020-04-27T19:34:31Z [loadblk] Reindexing block file blk00005.dat...
^C2020-04-27T19:34:32Z [loadblk] Shutdown requested. Exit ThreadImport
2020-04-27T19:34:32Z [qt-init] Interrupting HTTP server
...

@DrahtBot
Copy link
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@practicalswift
Copy link
Contributor

Concept ACK

@maflcko
Copy link
Member Author

maflcko commented Apr 28, 2020

Open-Close to re-run ci. See #15847 (comment)

@maflcko maflcko closed this Apr 28, 2020
@maflcko maflcko reopened this Apr 28, 2020
Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

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

Concept ACK.

if (nLoaded > 0)
LogPrintf("Loaded %i blocks from external file in %dms\n", nLoaded, GetTimeMillis() - nStart);
return nLoaded > 0;
LogPrintf("Loaded %i blocks from external file in %dms\n", nLoaded, GetTimeMillis() - nStart);
Copy link
Member

Choose a reason for hiding this comment

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

This change adds log entry if nLoaded == 0. Is it intentional?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. LoadExternalBlockFile is only called when files are actually read. If nLoaded is zero, something has gone wrong and we should be verbose about that.

Comment on lines +730 to +733
if (ShutdownRequested()) {
LogPrintf("Shutdown requested. Exit %s\n", __func__);
return;
}
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this block be outside of the if ... else ... statement?

Copy link
Member Author

Choose a reason for hiding this comment

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

why? That would be a slight behaviour change. Previously, we'd also loop over invalid files until the first valid file is found and then check for interruption. I don't think it matters much in any case.

Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

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

ACK faec3dc, tested on Linux Mint 19.3 (x86_64) both bitcoind and bitcoin-qt binaries.

@laanwj
Copy link
Member

laanwj commented May 4, 2020

Code review ACK faec3dc

@laanwj laanwj merged commit 42fd503 into bitcoin:master May 4, 2020
@maflcko maflcko deleted the 2004-noBoostInitThreadImport branch May 4, 2020 14:47
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request May 4, 2020
faec3dc init: Remove boost from ThreadImport (MarcoFalke)

Pull request description:

  Can be tested by calling `-reindex` or `-loadblock` and then pressing `CTRL`+`C`.

  Should print something like:

  ```
  ...
  2020-04-27T19:34:31Z [loadblk] Reindexing block file blk00005.dat...
  ^C2020-04-27T19:34:32Z [loadblk] Shutdown requested. Exit ThreadImport
  2020-04-27T19:34:32Z [qt-init] Interrupting HTTP server
  ...
  ```

ACKs for top commit:
  laanwj:
    Code review ACK faec3dc
  hebasto:
    ACK faec3dc, tested on Linux Mint 19.3 (x86_64) both `bitcoind` and `bitcoin-qt` binaries.

Tree-SHA512: e105af18d98296d82ec99f48e478cf44577e3c32f7e4b47617a7bc7cbf71d6becb92722f229a1be38d58ad29712704509ad9740d8ab8cd3104cf90057664b437
ComputerCraftr pushed a commit to ComputerCraftr/bitcoin that referenced this pull request Jun 16, 2020
faec3dc init: Remove boost from ThreadImport (MarcoFalke)

Pull request description:

  Can be tested by calling `-reindex` or `-loadblock` and then pressing `CTRL`+`C`.

  Should print something like:

  ```
  ...
  2020-04-27T19:34:31Z [loadblk] Reindexing block file blk00005.dat...
  ^C2020-04-27T19:34:32Z [loadblk] Shutdown requested. Exit ThreadImport
  2020-04-27T19:34:32Z [qt-init] Interrupting HTTP server
  ...
  ```

ACKs for top commit:
  laanwj:
    Code review ACK faec3dc
  hebasto:
    ACK faec3dc, tested on Linux Mint 19.3 (x86_64) both `bitcoind` and `bitcoin-qt` binaries.

Tree-SHA512: e105af18d98296d82ec99f48e478cf44577e3c32f7e4b47617a7bc7cbf71d6becb92722f229a1be38d58ad29712704509ad9740d8ab8cd3104cf90057664b437
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Jan 27, 2021
Summary:
> Can be tested by calling -reindex or -loadblock and then pressing CTRL+C.
>
> Should print something like:
>
> ```
> ...
> 2020-04-27T19:34:31Z [loadblk] Reindexing block file blk00005.dat...
> ^C2020-04-27T19:34:32Z [loadblk] Shutdown requested. Exit ThreadImport
> 2020-04-27T19:34:32Z [qt-init] Interrupting HTTP server
> ...
> ```

This is a backport of Core [[bitcoin/bitcoin#18786 | PR18786]]

Test Plan:
`ninja all check-all`

Run ` src/bitcoind -reindex`, stop the programs with Ctrl+C (and painfully reindex the whole chain)

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Differential Revision: https://reviews.bitcoinabc.org/D9072
kwvg added a commit to kwvg/dash that referenced this pull request Jul 13, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Jul 13, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Jul 13, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Jul 13, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Jul 15, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Jul 15, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Jul 15, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Jul 16, 2021
UdjinM6 added a commit to dashpay/dash that referenced this pull request Jul 16, 2021
vijaydasmp added a commit to vijaydasmp/dash that referenced this pull request Aug 23, 2021
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants