BDB: restore DB_PRIVATE flag to environment

8 messages GitHub Jeff Garzik, Diapolo, Pieter Wuille May 21, 2012 — May 21, 2012
Jeff Garzik (jgarzik) May 21, 2012 01:11 UTC Source ·

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.

Jeff Garzik (jgarzik) May 21, 2012 05:03 UTC Source ·

DB_REGION_INIT seems pointless if DB_PRIVATE is set.

Diapolo May 21, 2012 05:38 UTC Source ·

Seems means no bench :D? Perhaps consider DB_REGION_INIT, if DB_PRIVATE is not set?

sipa May 21, 2012 10:16 UTC Source ·

I’d like to know why DB_PRIVATE was enabled in the past, but disabled at some point. See commit fdbf76d4f49c2.

Jeff Garzik (jgarzik) May 21, 2012 14:58 UTC Source ·

@sipa satoshi removed DB_PRIVATE at my urging ;)

sipa May 21, 2012 15:21 UTC Source ·

@jgarzik Why…?

Jeff Garzik (jgarzik) May 21, 2012 15:25 UTC Source ·

See above: “In part, this enables processes other than bitcoind to examine the active database environment.”

sipa May 21, 2012 15:31 UTC Source ·

Oops, missed the pull request summary. ACK.