Skip to content

Conversation

maflcko
Copy link
Member

@maflcko maflcko commented Feb 18, 2021

Shorter and broader alternative to #21181

Rendered diff:

@@ -1,4 +1,4 @@
-Bitcoin Core version v21.99.0-db656db2ed5a (release build)
+Bitcoin Core version v21.99.0-faf48f20f196 (release build)
 Qt 5.15.2 (dynamic), plugin=wayland (dynamic)
 No static plugins.
 Style: adwaita / Adwaita::Style
@@ -24,8 +24,8 @@ scheduler thread start
 Using wallet directory /tmp/test_001/regtest/wallets
 init message: Verifying wallet(s)...
 init message: Loading banlist...
-ERROR: DeserializeFileDB: Failed to open file /tmp/test_001/regtest/banlist.dat
-Invalid or missing banlist.dat; recreating
+Missing or invalid file /tmp/test_001/regtest/banlist.dat
+Recreating banlist.dat
 SetNetworkActive: true
 Failed to read fee estimates from /tmp/test_001/regtest/fee_estimates.dat. Continue anyway.
 Using /16 prefix for IP bucketing
@@ -63,9 +63,9 @@ Bound to [::]:18444
 Bound to 0.0.0.0:18444
 Bound to 127.0.0.1:18445
 init message: Loading P2P addresses...
-ERROR: DeserializeFileDB: Failed to open file /tmp/test_001/regtest/peers.dat
-Invalid or missing peers.dat; recreating
-ERROR: DeserializeFileDB: Failed to open file /tmp/test_001/regtest/anchors.dat
+Missing or invalid file /tmp/test_001/regtest/peers.dat
+Recreating peers.dat
+Missing or invalid file /tmp/test_001/regtest/anchors.dat
 0 block-relay-only anchors will be tried for connections.
 init message: Starting network threads...
 net thread start

Copy link
Contributor

@vasild vasild left a comment

Choose a reason for hiding this comment

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

ACK fa5a8c3

@jnewbery
Copy link
Contributor

Is there a reason to not just change the return error(... for a LogPrintf(... and return false?

Also, run clang-format on the function
@maflcko
Copy link
Member Author

maflcko commented Feb 18, 2021

Done (and updated rendered diff in OP)

@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.

@jnewbery
Copy link
Contributor

utACK faf48f2

@jonatack
Copy link
Member

I think this is a strictly less helpful user experience, but it's clearly more popular than my proposals so I re-closed.

@maflcko
Copy link
Member Author

maflcko commented Feb 18, 2021

I am happy to adjust any part that has issues. The only thing I care about is that we fix this issue once completely, so that it doesn't come up again in the future.

@jonatack
Copy link
Member

#21181 addressed the reported issue. I was not aware of other issues filed that necessitated an expanded requirement and scope.

I closed #21181 because you are both the most active maintainer and the most active committer since years and it seems pointless to leave it open if you open a competing patch. Nevertheless, I'm surprised by the expressed all-that-matters imperative to widen the requirement. AFAIK we had one specific issue report. I believe a specific contained fix was a fine response to it.

@amitiuttarwar
Copy link
Contributor

utACK faf48f2, 👍 for consistency. also checked where we create / load other .dat files, looks good to me.

@maflcko
Copy link
Member Author

maflcko commented Feb 19, 2021

AFAIK we had one specific issue report. I believe a specific contained fix was a fine response to it.

Correct, nothing was wrong with that. Though, I overheard several devs (over the years) complain about this particular ERROR that happens on a normal and expected condition. Moreover, three reviewers left a comment in the other PR that it should be fixed for all 3 instances of the same issue (not just one). There is already a huge code churn in the repo and tracing back when a change has been made originally becomes a time-consuming task. While git log -S can deal perfectly fine with move-only, it will abort on every other change. So I think we shouldn't be aiming to make a change, knowing that it will be reverted soon in favour of a broader change.

... the most active maintainer and the most active committer since years and it seems pointless to leave it open if you open a competing patch.

I think it would be very alarming if any patch (or review) is simply preferred based on the number of commits or comments a contributor has made. In the (far) past, horrible consensus failures have been introduced by (presumably) relying on that metric. My impression is that code review and quality assurance have improved significantly since then. I can point to many high-impact bugs introduced in the last three months by "top-10" or "top-20" contributors by commit count and all of them have been caught by code review. I think when evaluating changes to Bitcoin (Core) we should purely take into account how much sense they make and not the reputation of the person voicing them.

@practicalswift
Copy link
Contributor

cr ACK faf48f2

@jnewbery
Copy link
Contributor

The scope of this PR seems to be creeping. It had three ACKs on the previous version, which simply removed the "ERROR" text from log message. The new version is changing what's exposed by the fs module, which seems unnecessary.

@maflcko
Copy link
Member Author

maflcko commented Feb 23, 2021

Ok, reverted

@maflcko maflcko merged commit 78effb3 into bitcoin:master Feb 23, 2021
@maflcko maflcko deleted the 2102-logFile branch February 23, 2021 15:07
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Feb 23, 2021
faf48f2 log: Clarify log message when file does not exist (MarcoFalke)

Pull request description:

  Shorter and broader alternative to bitcoin#21181

  Rendered diff:

  ```diff
  @@ -1,4 +1,4 @@
  -Bitcoin Core version v21.99.0-db656db2ed5a (release build)
  +Bitcoin Core version v21.99.0-faf48f20f196 (release build)
   Qt 5.15.2 (dynamic), plugin=wayland (dynamic)
   No static plugins.
   Style: adwaita / Adwaita::Style
  @@ -24,8 +24,8 @@ scheduler thread start
   Using wallet directory /tmp/test_001/regtest/wallets
   init message: Verifying wallet(s)...
   init message: Loading banlist...
  -ERROR: DeserializeFileDB: Failed to open file /tmp/test_001/regtest/banlist.dat
  -Invalid or missing banlist.dat; recreating
  +Missing or invalid file /tmp/test_001/regtest/banlist.dat
  +Recreating banlist.dat
   SetNetworkActive: true
   Failed to read fee estimates from /tmp/test_001/regtest/fee_estimates.dat. Continue anyway.
   Using /16 prefix for IP bucketing
  @@ -63,9 +63,9 @@ Bound to [::]:18444
   Bound to 0.0.0.0:18444
   Bound to 127.0.0.1:18445
   init message: Loading P2P addresses...
  -ERROR: DeserializeFileDB: Failed to open file /tmp/test_001/regtest/peers.dat
  -Invalid or missing peers.dat; recreating
  -ERROR: DeserializeFileDB: Failed to open file /tmp/test_001/regtest/anchors.dat
  +Missing or invalid file /tmp/test_001/regtest/peers.dat
  +Recreating peers.dat
  +Missing or invalid file /tmp/test_001/regtest/anchors.dat
   0 block-relay-only anchors will be tried for connections.
   init message: Starting network threads...
   net thread start

ACKs for top commit:
  jnewbery:
    utACK faf48f2
  amitiuttarwar:
    utACK faf48f2, 👍 for consistency. also checked where we create / load other `.dat` files, looks good to me.
  practicalswift:
    cr ACK faf48f2

Tree-SHA512: 697a728ef2b9f203363ac00b03eaf23ddf80bee043ecd3719265a0d884e8cfe88cd39afe946c86ab849edd1c836f05ec51125f052bdc14fe184b84447567756f
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Sep 17, 2021
faf48f2 log: Clarify log message when file does not exist (MarcoFalke)

Pull request description:

  Shorter and broader alternative to bitcoin#21181

  Rendered diff:

  ```diff
  @@ -1,4 +1,4 @@
  -Bitcoin Core version v21.99.0-db656db2ed5a (release build)
  +Bitcoin Core version v21.99.0-faf48f20f196 (release build)
   Qt 5.15.2 (dynamic), plugin=wayland (dynamic)
   No static plugins.
   Style: adwaita / Adwaita::Style
  @@ -24,8 +24,8 @@ scheduler thread start
   Using wallet directory /tmp/test_001/regtest/wallets
   init message: Verifying wallet(s)...
   init message: Loading banlist...
  -ERROR: DeserializeFileDB: Failed to open file /tmp/test_001/regtest/banlist.dat
  -Invalid or missing banlist.dat; recreating
  +Missing or invalid file /tmp/test_001/regtest/banlist.dat
  +Recreating banlist.dat
   SetNetworkActive: true
   Failed to read fee estimates from /tmp/test_001/regtest/fee_estimates.dat. Continue anyway.
   Using /16 prefix for IP bucketing
  @@ -63,9 +63,9 @@ Bound to [::]:18444
   Bound to 0.0.0.0:18444
   Bound to 127.0.0.1:18445
   init message: Loading P2P addresses...
  -ERROR: DeserializeFileDB: Failed to open file /tmp/test_001/regtest/peers.dat
  -Invalid or missing peers.dat; recreating
  -ERROR: DeserializeFileDB: Failed to open file /tmp/test_001/regtest/anchors.dat
  +Missing or invalid file /tmp/test_001/regtest/peers.dat
  +Recreating peers.dat
  +Missing or invalid file /tmp/test_001/regtest/anchors.dat
   0 block-relay-only anchors will be tried for connections.
   init message: Starting network threads...
   net thread start

ACKs for top commit:
  jnewbery:
    utACK faf48f2
  amitiuttarwar:
    utACK faf48f2, 👍 for consistency. also checked where we create / load other `.dat` files, looks good to me.
  practicalswift:
    cr ACK faf48f2

Tree-SHA512: 697a728ef2b9f203363ac00b03eaf23ddf80bee043ecd3719265a0d884e8cfe88cd39afe946c86ab849edd1c836f05ec51125f052bdc14fe184b84447567756f
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Sep 19, 2021
faf48f2 log: Clarify log message when file does not exist (MarcoFalke)

Pull request description:

  Shorter and broader alternative to bitcoin#21181

  Rendered diff:

  ```diff
  @@ -1,4 +1,4 @@
  -Bitcoin Core version v21.99.0-db656db2ed5a (release build)
  +Bitcoin Core version v21.99.0-faf48f20f196 (release build)
   Qt 5.15.2 (dynamic), plugin=wayland (dynamic)
   No static plugins.
   Style: adwaita / Adwaita::Style
  @@ -24,8 +24,8 @@ scheduler thread start
   Using wallet directory /tmp/test_001/regtest/wallets
   init message: Verifying wallet(s)...
   init message: Loading banlist...
  -ERROR: DeserializeFileDB: Failed to open file /tmp/test_001/regtest/banlist.dat
  -Invalid or missing banlist.dat; recreating
  +Missing or invalid file /tmp/test_001/regtest/banlist.dat
  +Recreating banlist.dat
   SetNetworkActive: true
   Failed to read fee estimates from /tmp/test_001/regtest/fee_estimates.dat. Continue anyway.
   Using /16 prefix for IP bucketing
  @@ -63,9 +63,9 @@ Bound to [::]:18444
   Bound to 0.0.0.0:18444
   Bound to 127.0.0.1:18445
   init message: Loading P2P addresses...
  -ERROR: DeserializeFileDB: Failed to open file /tmp/test_001/regtest/peers.dat
  -Invalid or missing peers.dat; recreating
  -ERROR: DeserializeFileDB: Failed to open file /tmp/test_001/regtest/anchors.dat
  +Missing or invalid file /tmp/test_001/regtest/peers.dat
  +Recreating peers.dat
  +Missing or invalid file /tmp/test_001/regtest/anchors.dat
   0 block-relay-only anchors will be tried for connections.
   init message: Starting network threads...
   net thread start

ACKs for top commit:
  jnewbery:
    utACK faf48f2
  amitiuttarwar:
    utACK faf48f2, 👍 for consistency. also checked where we create / load other `.dat` files, looks good to me.
  practicalswift:
    cr ACK faf48f2

Tree-SHA512: 697a728ef2b9f203363ac00b03eaf23ddf80bee043ecd3719265a0d884e8cfe88cd39afe946c86ab849edd1c836f05ec51125f052bdc14fe184b84447567756f
thelazier pushed a commit to thelazier/dash that referenced this pull request Sep 25, 2021
faf48f2 log: Clarify log message when file does not exist (MarcoFalke)

Pull request description:

  Shorter and broader alternative to bitcoin#21181

  Rendered diff:

  ```diff
  @@ -1,4 +1,4 @@
  -Bitcoin Core version v21.99.0-db656db2ed5a (release build)
  +Bitcoin Core version v21.99.0-faf48f20f196 (release build)
   Qt 5.15.2 (dynamic), plugin=wayland (dynamic)
   No static plugins.
   Style: adwaita / Adwaita::Style
  @@ -24,8 +24,8 @@ scheduler thread start
   Using wallet directory /tmp/test_001/regtest/wallets
   init message: Verifying wallet(s)...
   init message: Loading banlist...
  -ERROR: DeserializeFileDB: Failed to open file /tmp/test_001/regtest/banlist.dat
  -Invalid or missing banlist.dat; recreating
  +Missing or invalid file /tmp/test_001/regtest/banlist.dat
  +Recreating banlist.dat
   SetNetworkActive: true
   Failed to read fee estimates from /tmp/test_001/regtest/fee_estimates.dat. Continue anyway.
   Using /16 prefix for IP bucketing
  @@ -63,9 +63,9 @@ Bound to [::]:18444
   Bound to 0.0.0.0:18444
   Bound to 127.0.0.1:18445
   init message: Loading P2P addresses...
  -ERROR: DeserializeFileDB: Failed to open file /tmp/test_001/regtest/peers.dat
  -Invalid or missing peers.dat; recreating
  -ERROR: DeserializeFileDB: Failed to open file /tmp/test_001/regtest/anchors.dat
  +Missing or invalid file /tmp/test_001/regtest/peers.dat
  +Recreating peers.dat
  +Missing or invalid file /tmp/test_001/regtest/anchors.dat
   0 block-relay-only anchors will be tried for connections.
   init message: Starting network threads...
   net thread start

ACKs for top commit:
  jnewbery:
    utACK faf48f2
  amitiuttarwar:
    utACK faf48f2, 👍 for consistency. also checked where we create / load other `.dat` files, looks good to me.
  practicalswift:
    cr ACK faf48f2

Tree-SHA512: 697a728ef2b9f203363ac00b03eaf23ddf80bee043ecd3719265a0d884e8cfe88cd39afe946c86ab849edd1c836f05ec51125f052bdc14fe184b84447567756f
gades pushed a commit to cosanta/cosanta-core that referenced this pull request May 17, 2022
faf48f2 log: Clarify log message when file does not exist (MarcoFalke)

Pull request description:

  Shorter and broader alternative to bitcoin#21181

  Rendered diff:

  ```diff
  @@ -1,4 +1,4 @@
  -Bitcoin Core version v21.99.0-db656db2ed5a (release build)
  +Bitcoin Core version v21.99.0-faf48f20f196 (release build)
   Qt 5.15.2 (dynamic), plugin=wayland (dynamic)
   No static plugins.
   Style: adwaita / Adwaita::Style
  @@ -24,8 +24,8 @@ scheduler thread start
   Using wallet directory /tmp/test_001/regtest/wallets
   init message: Verifying wallet(s)...
   init message: Loading banlist...
  -ERROR: DeserializeFileDB: Failed to open file /tmp/test_001/regtest/banlist.dat
  -Invalid or missing banlist.dat; recreating
  +Missing or invalid file /tmp/test_001/regtest/banlist.dat
  +Recreating banlist.dat
   SetNetworkActive: true
   Failed to read fee estimates from /tmp/test_001/regtest/fee_estimates.dat. Continue anyway.
   Using /16 prefix for IP bucketing
  @@ -63,9 +63,9 @@ Bound to [::]:18444
   Bound to 0.0.0.0:18444
   Bound to 127.0.0.1:18445
   init message: Loading P2P addresses...
  -ERROR: DeserializeFileDB: Failed to open file /tmp/test_001/regtest/peers.dat
  -Invalid or missing peers.dat; recreating
  -ERROR: DeserializeFileDB: Failed to open file /tmp/test_001/regtest/anchors.dat
  +Missing or invalid file /tmp/test_001/regtest/peers.dat
  +Recreating peers.dat
  +Missing or invalid file /tmp/test_001/regtest/anchors.dat
   0 block-relay-only anchors will be tried for connections.
   init message: Starting network threads...
   net thread start

ACKs for top commit:
  jnewbery:
    utACK faf48f2
  amitiuttarwar:
    utACK faf48f2, 👍 for consistency. also checked where we create / load other `.dat` files, looks good to me.
  practicalswift:
    cr ACK faf48f2

Tree-SHA512: 697a728ef2b9f203363ac00b03eaf23ddf80bee043ecd3719265a0d884e8cfe88cd39afe946c86ab849edd1c836f05ec51125f052bdc14fe184b84447567756f
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 16, 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.

8 participants