DB_PRIVATE is the worst of both worlds. DB_PRIVATE is not exclusive, but it does make it get screwed up if another process tries to access it at the same time.
I've dropped the DB_PRIVATE flag in rev 153.
SN-1691 已核对来源,附原文与上下文。
另外,Bitcoin 是不是以独占方式打开 BerkeleyDB,从而不需要文件锁?不是——我自己测过了。
有没有办法以独占方式打开 BerkeleyDB?
DB_PRIVATE 是两头不讨好的东西。它并不独占,但一旦另一个进程试图同时访问,它就会把事情搞砸。
我在 rev 153 里去掉了 DB_PRIVATE 标志。