lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shai Erera (JIRA)" <>
Subject [jira] [Commented] (LUCENE-3193) TwoPhaseCommit interface
Date Sun, 12 Jun 2011 17:09:51 GMT


Shai Erera commented on LUCENE-3193:

But: perhaps a different exception should be thrown if there is a problem in the commit()
loop vs the prepareCommit() loop? This way caller can differentiate this case?

Good idea. So instead of throwing IOE, we'll throw (Prepare)CommitFailException which takes
a Throwable 'cause' and TPC 'obj'. We can make the two sub-class IOE for convenience (in case
someone does not want to differentiate the two, it's easier to handle both cases in one catch

I'll add these and upload a new patch by tomorrow.

> TwoPhaseCommit interface
> ------------------------
>                 Key: LUCENE-3193
>                 URL:
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: core/index
>            Reporter: Shai Erera
>            Assignee: Shai Erera
>             Fix For: 3.3, 4.0
>         Attachments: LUCENE-3193.patch
> I would like to propose 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.
> In addition, a TwoPhaseCommitTool which implements a 2-phase commit amongst several TPCs.
> Having IndexWriter implement that interface will allow running the 2-phase commit algorithm
on multiple IWs or IW + any other object that implements the interface.
> We should mark the interface @lucene.internal so as to not block ourselves in the future.
This is pretty advanced stuff anyway.
> Will post a patch soon

This message is automatically generated by JIRA.
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message