Home | About | Sematext search-lucene.com search-hadoop.com
 Search Lucene and all its subprojects:

Switch to Plain View
Lucene, mail # dev - A TwoPhaseCommit interface


Copy link to this message
-
A TwoPhaseCommit interface
Shai Erera 2011-06-11, 11:28
Hi

I wrote a TwoPhaseCommit interface which declares the methods necessary
to implement a 2-phase commit algorithm:
* prepareCommit()
* commit()
* rollback()

The prepare/commit ones have variants that take a (Map<String,String>
commitData) following the ones we have in IndexWriter.

I also wrote TwoPhaseCommitTool which implements a 2-phase
commit amongst several TPCs.

Both were written with the intention to use them while committing an
IndexWriter + objects that use IW internally. Making IW impl it will be
convenient.

Plus, I think it is a useful interface and perhaps we'll find other uses for

it in the future (maybe Solr already has?)

I know that interfaces are not very popular here, so I don't mind if we
mark it @lucene.internal.

What do you think? I can post a patch if you think this is worth having in
Lucene.

Shai
+
Michael McCandless 2011-06-11, 12:00
+
Shai Erera 2011-06-11, 12:25
+
Simon Willnauer 2011-06-11, 13:06