directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel L├ęcharny <elecha...@gmail.com>
Subject [Mavibot] Transaction support
Date Thu, 12 Mar 2015 08:18:30 GMT
Hi,

I'm currently working on implementing transactions in Mavibot. Here is
the current state of art and what I have in mind :

- transactions should be cross-B-trees. That means we should be able to
update many B-trees, many times, but see those updates as a whole (ie,
either all the B-trees are in the latest revision when all the upadates
are done, or we remain in the original revision for all the B-tress if
any error occurs.
- of course, if a crash occurs in the middle of a transaction, we should
restart in the exact configuration we where *before* the very first
update done in the transaction
- we should avoid as much as possible writes on disk during this phase

Here is how I see the implementation :
- it's all about avoiding to write the RM header until the commit. As
this page points to the BoB header which contains the latest revision,
differing its update until the commit will always make it point to the
latest revision, or the initial if we rollback everything (or if we have
a crash).
- for the same reason, we can avoid updates in the BOB until the commit.
We then save a lot of writes, as we are supposed to update the BoB for
every B-tree update. That would save up to 50% of the required writes.
- if we have to rollback, we should moved all the updated pages (B-tree
updates) to the free page list. In order to be able to do that, we have
to keep a track of all the created/modified page offsets in memory.

I'll work on that soon, it should not be complex to implement.

Thoughts ?


Mime
View raw message