Use erase instead of rewrite to remove old addr entries #994
pull sipa wants to merge 1 commits into bitcoin:master from sipa:deladdr changing 2 files +12 −20-
sipa commented at 6:27 pm on March 26, 2012: memberFixes #982.
-
Use erase instead of rewrite to remove old addr entries 53cb1a49e7
-
gavinandresen commented at 6:36 pm on March 26, 2012: contributor
ACK. Tested on my Mac via:
- Run old code with luke’s broken testnet/ dir : result: hang
- Restore addr.dat with addr.dat.hang
- Re-run with this patch : result : happy bitcoind
sipa: any idea why this fixes the issue, or what the issue was in the first place?
-
sipa commented at 6:42 pm on March 26, 2012: memberNo, I don’t understand what’s going on. I made bitcoind close the entire database environnement and create a new one when doing the rewrite, and it still blocks as soon as it tries to write a single value to the file. I have no idea what it is waiting for, but bdb calls pthread_cond_wait while there is only a single thread alive, which means a guaranteed deadlock.
-
gavinandresen referenced this in commit 84560c41c7 on Mar 26, 2012
-
gavinandresen merged this on Mar 26, 2012
-
gavinandresen closed this on Mar 26, 2012
-
coblee referenced this in commit 357ed7222c on Jul 17, 2012
-
ptschip referenced this in commit f7f227e728 on Mar 6, 2018
-
Bushstar referenced this in commit e0a3e9d71a on Sep 10, 2019
-
DrahtBot locked this on Sep 8, 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-12-22 00:12 UTC
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-12-22 00:12 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me