directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Karasulu <>
Subject Re: TXN work update
Date Tue, 01 Nov 2011 03:35:49 GMT
On Thu, Oct 20, 2011 at 4:24 PM, Selcuk AYA <> wrote:

Excuse the late response. Better late than never right ...

SNIP ...

> *Master table, index and index cursor wrappers: These provide
> transactionally consistent views of entries and index data. They merge
> what they read from their wrapped objects with the txn log manager. To
> make this easier, txn manager keeps track of index changes for a
> read/write txn in a summary form. One thing to note is that not all
> information that wrappers expose is transactionall consistent. One
> example is count methods. No need to %100 accurate on this. For these
> cases, the wrapper just calls the wrapped object.
Makes perfect sense to not bother with the count methods: slight variations
will not at all impact the optimizer's results.

> *For all the above, interfaces are defined in core-api and
> implementations and internal interfaces are in core. Also moved,
> index, indexcursor, table and related interfaces and helper classes to
> core-api from xdbm-partition.
I guess the xdbm-partition Maven module is now going to be pretty damn thin
or non-existent. Was this module destroyed and if not what actually remains?

> The todo is the following:
> *add changes to keep track of dn space changes.
> *test txn manager services
> *move the modification code path in AbstractBTreePartition in xdbm to
> high up to core. Probably modifications should be done in
> partitionNexus and partition nexus should handle preparing txn log
> edits and wal them. The overall flow for modifications will be:
>   -DefaultDirectoryService:
>          -begintxn
>                            -execute interceptor chain
>          - handle txn abort, or conflict.
Moving this into the PartitionNexus might not be a good idea but no problem
for now we can move it later. Let me explain why:

Eventually we're going to enable a root Partition with Partition nesting
and so when this happens the PartitionNexus will just be another nestable
Partition since these will have to handle routing based on DN to other
partitions residing/nested under it.

I see two possible locations for this functionality:

(1) Let the InterceptorChain itself handle this since it can demarcate the
start and end of calls into the chain with Txn begin and abort/commit
calls. It does this by making calls against the TxnManager which I guess is
the entire facade for the transaction subsystem.


(2) Handle Txn demarcation within the CoreSession. However this might not
be optimal due to the need to handle additional logic which might be
required for handling chain re-entry concerns.

NOTE: I've not actually looked at the code after these major moves so my
advice might not be very dependable. I will try to setup my environment to
get a better idea of these matters.

However for the time being do whatever actually makes this thing work.
Let's follow an agile methodology. This thing is big. So let's get it
working with solid test coverage then we can actually look at shuffling
things around to optimal positions. Not saying what you've chosen is wrong
... it might just present the need for some additional refactoring when
other features might need to be introduced.

These are some of the biggest changes to the architecture to have taken
place in years and you're doing a great job.

*move xdbm-search to core as well. Making search transactional will
> mostly be mostly mechanica after this point I think(hope). It should
> just use the wrappers the txn manager provides for index, master and
> cursors it gets from the partitions.
> *handle caches various interceptors keep. I am thinking of handling
> this with a common read-write lock.
This was the latest issue for which I see some more threads. Will look at
that as well.

Again sorry about late responses.


> regards
> Selcuk
> On Thu, Oct 20, 2011 at 4:05 PM, Selcuk AYA <> wrote:
> > Hi all,
> >
> > Emmanuel wants to update the txns branch and I think it is a good time
> > to give a good status update. Following is what I have been doing and
> > the plan:
> >
> > *Log Manager: A general log manager that can be used by txns as well.
> > Note that these logs are on disk. This is tested.
> >
> > *Txn Manager:Most of the services that should be provided by the txn
> > manager is coded:
> > begin, commit, abort, keeping
> >

Best Regards,
-- Alex

View raw message