[ 
https://issues.apache.org/jira/browse/SOLR-670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12672526#action_12672526
 ] 

Shalin Shekhar Mangar commented on SOLR-670:
--------------------------------------------

I commented out the commit in DirectUpdateHandlerTest#testAddRollback and I saw 
the same exception.

org.apache.lucene.store.AlreadyClosedException: this IndexWriter is closed
        at org.apache.lucene.index.IndexWriter.ensureOpen(IndexWriter.java:410)
        at org.apache.lucene.index.IndexWriter.ensureOpen(IndexWriter.java:415)
        at 
org.apache.lucene.index.IndexWriter.updateDocument(IndexWriter.java:2170)
        at 
org.apache.solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.java:234)
        at 
org.apache.solr.update.DirectUpdateHandlerTest.addSimpleDoc(DirectUpdateHandlerTest.java:254)
        at 
org.apache.solr.update.DirectUpdateHandlerTest.testAddRollback(DirectUpdateHandlerTest.java:188)

Now that I'm looking at this again, I don't see why a commit should be 
necessary at all. If DUH2#rollbackWriter sets writer=null, then we wouldn't 
need to call commit at all and we don't really need to refresh the 
IndexSearcher because the index does not change. I'll re-open the issue and 
attach a patch.

> UpdateHandler must provide a rollback feature
> ---------------------------------------------
>
>                 Key: SOLR-670
>                 URL: https://issues.apache.org/jira/browse/SOLR-670
>             Project: Solr
>          Issue Type: New Feature
>          Components: search
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>            Assignee: Shalin Shekhar Mangar
>             Fix For: 1.4
>
>         Attachments: SOLR-670.patch, SOLR-670.patch, SOLR-670.patch
>
>
> Lucene IndexWriter already has a rollback method. There should be a 
> counterpart for the same in _UpdateHandler_  so that users can do a rollback 
> over http 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to