[Date Prev][Date Next]
Re: (ITS#7774) LMDB assertion failure during Postfix cache cleanup
On 2014-01-08 18:23, Howard Chu wrote:
> Wietse Venema wrote:
>> Hallvard Breien Furuseth:
>>> Process A may see garbage data.
> This is wrong. The fcntl locks will definitely prevent two processes
> from interfering with each other. The reason this bug occurs is
> because fcntl locks cannot prevent two transactions within a single
> process from stomping on each other.
Hmm. OK, after some discussion with Howard:
This was so with Howard's original code, it wrapped each mdb_get() in
a transaction. postfix-2.11-20131228/src/util/slmdb.c breaks this by
preserving the read transaction until an error happens which is bad
enough for the code to notice.
Locks around cursors are pointless as well as insufficient from
lmdb's point of view. It is transactions which must be protected.