lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shai Erera (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-4575) Allow IndexWriter to commit, even just commitData
Date Sun, 02 Dec 2012 19:13:58 GMT

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

Shai Erera commented on LUCENE-4575:
------------------------------------

Hmmm ... setting the commitData on pendingCommit cannot work, b/c the commitData is written
to segnOutput on prepareCommit(). Following commit() merely calls infos.finishCommit() which
writes the checksum and closes the output.

Can we modify segmentInfos.write() to not write the commitData, but move it to finishCommit()?
Not sure that I like this approach, because it means that finishCommit() will do slightly
more work, which increases the chance of getting an IOException during commit() after prepareCommit()
successfully returned, but on the other hand it's the gains might be worth it? Being able
to write commitData after you know all your document additions/deletions/updates are 'safe'
might prove valuable. And finishCommit() already does I/O, writing checksum ...

What do you think?
                
> Allow IndexWriter to commit, even just commitData
> -------------------------------------------------
>
>                 Key: LUCENE-4575
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4575
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: core/index
>            Reporter: Shai Erera
>            Priority: Minor
>         Attachments: LUCENE-4575.patch, LUCENE-4575.patch, LUCENE-4575-testcase.patch
>
>
> Spinoff from here http://lucene.472066.n3.nabble.com/commit-with-only-commitData-td4022155.html.
> In some cases, it is valuable to be able to commit changes to the index, even if the
changes are just commitData. Such data is sometimes used by applications to register in the
index some global application information/state.
> The proposal is:
> * Add a setCommitData() API and separate it from commit() and prepareCommit() (simplify
their API)
> * When that API is called, flip on the dirty/changes bit, so that this gets committed
even if no other changes were made to the index.
> I will work on a patch a post.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


Mime
View raw message