[ 
https://issues.apache.org/jira/browse/LUCENE-3193?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13048296#comment-13048296
 ] 

Shai Erera commented on LUCENE-3193:
------------------------------------

bq. TwoPhaseCommitTool.execute should be @experimental?

Since it is an inner class of TPC, and it is marked @experimental, I thought it 
is implied. But I will add it there too for clarity.

bq. Shouldn't TwoPhaseCommit be @lucene.experimental instead

You're right. I'll fix !

bq. Javadocs should maybe state that on rollback the writer will have been 
closed?

This is mentioned in IndexWriter.rollback(). I don't think we should mention IW 
in TPC javadocs?

bq. One possible issue: if exceptions are hit in .commit()

You're right. And TPCTool.execute has a *NOTE* about it, saying that for some 
TPC implementations, calling rollback() after commit() was successfully 
executed may be a no-op. I put it on execute because I think it is more related 
to the tool than TPC.rollback() definition.

> TwoPhaseCommit interface
> ------------------------
>
>                 Key: LUCENE-3193
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3193
>             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: http://www.atlassian.com/software/jira

        

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

Reply via email to