lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless" <>
Subject Re: Deprecation of flush in IndexWriter
Date Sun, 13 Apr 2008 08:59:31 GMT
Shay Banon <> 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.


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

View raw message