You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Shai Erera <se...@gmail.com> on 2011/06/11 13:28:06 UTC

A TwoPhaseCommit interface

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

Re: A TwoPhaseCommit interface

Posted by Simon Willnauer <si...@googlemail.com>.
On Sat, Jun 11, 2011 at 2:00 PM, Michael McCandless
<lu...@mikemccandless.com> wrote:
> This sounds great!
>
+1
> Mike McCandless
>
> http://blog.mikemccandless.com
>
> On Sat, Jun 11, 2011 at 7:28 AM, Shai Erera <se...@gmail.com> wrote:
>> 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
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: A TwoPhaseCommit interface

Posted by Shai Erera <se...@gmail.com>.
Thanks Mike. Opened LUCENE-3193.

Shai

On Sat, Jun 11, 2011 at 3:00 PM, Michael McCandless <
lucene@mikemccandless.com> wrote:

> This sounds great!
>
> Mike McCandless
>
> http://blog.mikemccandless.com
>
> On Sat, Jun 11, 2011 at 7:28 AM, Shai Erera <se...@gmail.com> wrote:
> > 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
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>

Re: A TwoPhaseCommit interface

Posted by Michael McCandless <lu...@mikemccandless.com>.
This sounds great!

Mike McCandless

http://blog.mikemccandless.com

On Sat, Jun 11, 2011 at 7:28 AM, Shai Erera <se...@gmail.com> wrote:
> 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
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org