lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless" <luc...@mikemccandless.com>
Subject Re: Deprecation of flush in IndexWriter
Date Sun, 13 Apr 2008 08:59:31 GMT
Shay Banon <kimchy@gmail.com> wrote:

>  That what was I was hoping to get to eventually. I agree that flush can do
>  much more (and be better renamed to prepare). If we can get something like
>  that, it would be great.

I'll work through a patch...

>  Just a note regarding two phase transactions, there is no guarantee
>  (at least none that I am aware of) regarding the ordering of the
>  first phase for XAResource, so having the lucene transaction as the
>  last one is not easily implemented.

I was picturing that Lucene would not be an XAResource.  All other 2pc
resources would.  So you would call prepare() on all XAResources.  If
they all succeed, you call Lucene's "commit".  If that fails, you
rollback all other resources; if it succeeds, you commit all others.

If you have no control over the transaction manager (ie, you're not
interacting with the XAResources yourself), then I agree this approach
is not easily done.

Mike

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


Mime
View raw message