BDB: restore DB_PRIVATE flag to environment #1367

pull jgarzik wants to merge 1 commits into bitcoin:master from jgarzik:db-private changing 1 files +6 −1
  1. jgarzik commented at 1:11 am on May 21, 2012: contributor

    Satoshi’s commits fdbf76d4f49c220e2ed4412a3d8d8cd6efd74826 and c8ad9b8375f5308bb46a124f096a80926ea42fba (SVN import) removed the DB_PRIVATE flag from the environment. In part, this enables processes other than bitcoind to examine the active database environment.

    However, this incurs a slight performance penalty versus working entirely within application memory (DB_PRIVATE). Because bitcointools and other direct-BDB-accessing tools are not used by the vast majority of users, prefer to default with DB_PRIVATE with the option of disabling it if needed via -privdb=0.

  2. gmaxwell commented at 1:42 am on May 21, 2012: contributor
    hm last time I accidentally ran bitcointools against a running node it corrupted the crap out of it. I didn’t even think this was supported.
  3. jgarzik commented at 1:52 am on May 21, 2012: contributor
    Yeah even with DB_PRIVATE cleared, there is a truckload of multi-process usage caveats.
  4. Diapolo commented at 4:59 am on May 21, 2012: none
    I was playing around with this flag too and never had any obvious problems with it. What I observed was, that no __db.001 - __db.006 file is generated, as memory regions are created in per-process heap memory. @jgarzik While you are at it, could you bench with the flag dbenv.set_flags(DB_REGION_INIT, 1); added and report (I know sipa tried it once)?
  5. jgarzik commented at 5:03 am on May 21, 2012: contributor
    DB_REGION_INIT seems pointless if DB_PRIVATE is set.
  6. Diapolo commented at 5:38 am on May 21, 2012: none
    Seems means no bench :D? Perhaps consider DB_REGION_INIT, if DB_PRIVATE is not set?
  7. sipa commented at 10:16 am on May 21, 2012: member
    I’d like to know why DB_PRIVATE was enabled in the past, but disabled at some point. See commit fdbf76d4f49c2.
  8. jgarzik commented at 2:58 pm on May 21, 2012: contributor
    @sipa satoshi removed DB_PRIVATE at my urging ;)
  9. sipa commented at 3:21 pm on May 21, 2012: member
    @jgarzik Why…?
  10. jgarzik commented at 3:25 pm on May 21, 2012: contributor
    See above: “In part, this enables processes other than bitcoind to examine the active database environment.”
  11. sipa commented at 3:31 pm on May 21, 2012: member
    Oops, missed the pull request summary. ACK.
  12. BDB: restore DB_PRIVATE flag to environment
    Satoshi's commits fdbf76d and c8ad9b8 (SVN import) removed the
    DB_PRIVATE flag from the environment.  In part, this enables processes
    other than bitcoind to examine the active database environment.
    
    However, this incurs a slight performance penalty versus working
    entirely within application memory (DB_PRIVATE).  Because bitcointools
    and other direct-BDB-accessing tools are not used by the vast
    majority of users, prefer to default with DB_PRIVATE with the option
    of disabling it if needed via -privdb=0.
    9c137aaccf
  13. jgarzik referenced this in commit ce4cc630c2 on May 21, 2012
  14. jgarzik merged this on May 21, 2012
  15. jgarzik closed this on May 21, 2012

  16. coblee referenced this in commit 59e945e336 on Jul 17, 2012
  17. jgarzik deleted the branch on Aug 24, 2014
  18. suprnurd referenced this in commit 01eeb59af6 on Dec 5, 2017
  19. lateminer referenced this in commit 82b4147a30 on May 6, 2020
  20. 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 site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me