[Date Prev][Date Next]
Re: MDB v2: Replace meta pages with "meta position" word
Hallvard Breien Furuseth wrote:
One thing about ACID - IIRC there are some potential data races which my
single-word meta info in the header will fix. E.g. if the user does ^Z
at an unfortunate time, and with WRITEMAP updating the meta page while a
txn is reading it.
Reproducible by sending frequent SIGSTOPs and SIGCONTs, with mdb.c
patched to verify (memcmp or checksum) the meta info after copying.
Happens even with 1 MDB process.
(Re comments elsewhere: Selecting a meta page is atomic, but
copying/writing it is not.)
True, but writing the meta page doesn't need to be atomic - it won't be
considered current until its txnid is updated. Until then, its txnid will be
less than the other page's anyway.
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/