原始文献 / 论坛帖 / Re: Running on a port other than 8333

Re: Running on a port other than 8333

Bitcointalk · 2010-09-12 17:40:20 UTC

AuthorSatoshi Nakamoto
TitleRe: Running on a port other than 8333
Date2010-09-12 17:40:20 UTC
ForumBitcointalk · 原文

引用自 lachesis,发表于 August 10, 2010, 03:24:55 PM(https://bitcointalk.org/index.php?topic=589.msg8544#msg8544)

另外,比特币打开 BerkeleyDB 是独占的吗,从而不需要文件锁?它不是——我自己测试过。

有办法独占打开 BerkeleyDB 吗?

DB_PRIVATE 是两头不讨好。DB_PRIVATE 不是独占的,但别的进程同时访问时它会被搞坏。

我在 rev 153 里去掉了 DB_PRIVATE 标志。

英文原文

Quote from: lachesis on August 10, 2010, 03:24:55 PM(https://bitcointalk.org/index.php?topic=589.msg8544#msg8544)

Also, does Bitcoin open the BerkeleyDB as exclusive, precluding the need for a file lock?It does not -- did my own tests.

Is there a way to open BerkeleyDB exclusive?

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.