SN-1691 已核对来源,附原文与上下文。
其他参与者原话lachesis原帖 ↗
另外,Bitcoin 是不是以独占方式打开 BerkeleyDB,从而不需要文件锁?不是——我自己测过了。
Also, does Bitcoin open the BerkeleyDB as exclusive, precluding the need for a file lock?It does not -- did my own tests.
有没有办法以独占方式打开 BerkeleyDB?
Is there a way to open BerkeleyDB exclusive?
DB_PRIVATE 是两头不讨好的东西。它并不独占,但一旦另一个进程试图同时访问,它就会把事情搞砸。
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.
我在 rev 153 里去掉了 DB_PRIVATE 标志。
I've dropped the DB_PRIVATE flag in rev 153.