[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: LMDB: transactions across dbis, dbi lifetime
- To: openldap-technical@openldap.org
- Subject: Re: LMDB: transactions across dbis, dbi lifetime
- From: Martin Lucina <martin@lucina.net>
- Date: Tue, 18 Feb 2014 14:17:55 +0100
- Content-disposition: inline
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lucina.net; s=dkim-201309; t=1392729475; bh=LaqO8dl+UeEI4uMPi7vvaMhmLY2nwfW64APX79QFBb8=; h=Date:From:To:Subject:References:In-Reply-To:From; b=O60cmc9HRInHCDDls++DEGSMb0kRSjvo9fHvf9kZGdbRVwbnWS2/m8UJkGXjZaIzD 98axMBk2uvv18IXAE4ApuQF29w1BHfURFGgzNz0uH16zj/yDcahS4Mr8DwXM7d28O/ CBrCU15alJp5HPUz0tjvMwu+otNnVzr0zfp8g628shTaeFB3C+GR7bC0YG+WM0wmU+ CXw3vk3Zhw8bUO8Vqeug6NgbDBuaTMJSRYNkprzgv/S/jRheWEvUGs6BIjiy42SnEN zlV4owaJwH0+vgdyfXS1MHNM9dheJjGoqYSmJ/hUTOwuSHWQeJPrAPwGwrSXgFBl0o uMgA12Tj3RVhQ==
- In-reply-to: <53026D2E.3050304@symas.com>
- Mail-followup-to: openldap-technical@openldap.org
- References: <20140217170335.GJ16416@nodbug.moloch.sk> <53026D2E.3050304@symas.com>
- User-agent: Mutt/1.5.21 (2010-09-15)
hyc@symas.com said:
> > In other words, may a txn span multiple dbis?
>
> Of course. Where in the quoted doc is it ever implied otherwise?
Sorry, I was thinking about two separate things at the same time when I
wrote this, this one is not related to the quoted doc. Thanks for answering
anyway.
> [...]
> >3. Is the dbi still valid if a subsequent transaction on it is aborted with
> > mdb_txn_abort()? The first part of the quoted paragraph suggests not...?
>
> Why would you expect any subsequent abort to have any effect? This
> is the entire point of a transactional DB system - any event
> occurring in a transaction can only be committed once, or aborted
> once. No subsequent aborts can rollback anything from a prior
> commit.
I wouldn't and of course that's the point of a transactional DB. Perhaps I
wasn't clear, let me try again:
Perhaps the doc for mdb_dbi_open() could be improved as follows:
The database handle will be private to the current transaction until
the transaction is successfully committed. If the transaction which
used this function is aborted the handle will be closed automatically.
I added "...which used this function..." to make it unambiguous which
transaction the text is referring to.
Martin