BDB: restore DB_PRIVATE flag to environment

8 messages GitHub Jeff Garzik, Diapolo, Pieter Wuille May 21, 2012 — May 21, 2012

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.

DB_REGION_INIT seems pointless if DB_PRIVATE is set.

Diapolo May 21, 2012 Source · Permalink

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

sipa May 21, 2012 Source · Permalink

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

@sipa satoshi removed DB_PRIVATE at my urging ;)

sipa May 21, 2012 Source · Permalink

@jgarzik Why…?

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

sipa May 21, 2012 Source · Permalink

Oops, missed the pull request summary. ACK.