Allow quicker shutdowns during LoadBlockIndex() #12980
pull jonasschnelli wants to merge 1 commits into bitcoin:master from jonasschnelli:2018/04/shutdown changing 3 files +3 −0-
jonasschnelli commented at 7:27 pm on April 13, 2018: contributor
-
promag commented at 8:33 pm on April 13, 2018: memberConcept ACK. Will review.
-
in src/init.cpp:1452 in 404c7a10ff outdated
1448@@ -1449,6 +1449,7 @@ bool AppInitMain() 1449 // Note that it also sets fReindex based on the disk flag! 1450 // From here on out fReindex and fReset mean something different! 1451 if (!LoadBlockIndex(chainparams)) { 1452+ if (fRequestShutdown) break;
promag commented at 8:49 am on April 14, 2018:Also useShutdownRequested()
? I realize thatfRequestShutdown
is used insrc/init.cpp
(the function is also used) but I wonder if usingShutdownRequested()
should be used instead.
promag commented at 9:31 am on May 3, 2018:Ping.meshcollider added the label Refactoring on Apr 16, 2018jonasschnelli force-pushed on May 3, 2018jonasschnelli commented at 12:03 pm on May 3, 2018: contributorFixed @promag’s finding.in src/init.cpp:1472 in 2b42793db4 outdated
1448@@ -1449,6 +1449,7 @@ bool AppInitMain() 1449 // Note that it also sets fReindex based on the disk flag! 1450 // From here on out fReindex and fReset mean something different! 1451 if (!LoadBlockIndex(chainparams)) { 1452+ if (ShutdownRequested()) break; 1453 strLoadError = _("Error loading block database");
promag commented at 12:08 pm on May 3, 2018:I’ll try to follow up a refactor here: this error should come fromLoadBlockIndex
and therefore the above condition is not necessary.promag commented at 12:09 pm on May 3, 2018: memberutACK 2b42793.in src/txdb.cpp:258 in 2b42793db4 outdated
267@@ -268,6 +268,7 @@ bool CBlockTreeDB::LoadBlockIndexGuts(const Consensus::Params& consensusParams, 268 // Load mapBlockIndex 269 while (pcursor->Valid()) { 270 boost::this_thread::interruption_point(); 271+ if (ShutdownRequested()) return false;
Empact commented at 4:00 am on July 9, 2018:IMO no need to rebase when the necessary change is in master as it will be brought in via the merge. Maybe just call out its relevance to the ack, as you have here.
l2a5b1 commented at 7:27 am on July 9, 2018:You’re absolutely right: a rebase is not required to merge successfully. Good point, thanks!Allow quicker shutdowns during LoadBlockIndex() af5fa82b67jonasschnelli force-pushed on Aug 2, 2018DrahtBot commented at 1:21 pm on September 21, 2018: memberThe following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Conflicts
Reviewers, this pull request conflicts with the following ones:
- #13582 (Extract AppInitLoadBlockIndex from AppInitMain by Empact)
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.
DrahtBot closed this on Apr 28, 2019
DrahtBot commented at 7:12 pm on April 28, 2019: memberDrahtBot reopened this on Apr 28, 2019
promag commented at 9:59 pm on May 18, 2019: memberutACK af5fa82b676a36e60eda080ca0a946bdfffefd49.
Anything against this change?
practicalswift commented at 10:32 pm on May 18, 2019: contributorutACK af5fa82b676a36e60eda080ca0a946bdfffefd49jonasschnelli merged this on May 19, 2019jonasschnelli closed this on May 19, 2019
jonasschnelli referenced this in commit 7110d455eb on May 19, 2019sidhujag referenced this in commit 5b2fbd6bf0 on May 20, 2019deadalnix referenced this in commit 54554de6b6 on Jun 11, 2020PastaPastaPasta referenced this in commit 53439a57b6 on Jun 27, 2021PastaPastaPasta referenced this in commit 963de0797a on Jun 28, 2021PastaPastaPasta referenced this in commit 7c77d2aeae on Jun 29, 2021PastaPastaPasta referenced this in commit 7d6d1bb095 on Jul 1, 2021PastaPastaPasta referenced this in commit 558a4cb1f4 on Jul 1, 2021PastaPastaPasta referenced this in commit 756af776fd on Jul 12, 2021DrahtBot locked this on Dec 16, 2021
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-23 12:12 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me