You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Noble Paul (JIRA)" <ji...@apache.org> on 2008/07/31 06:32:31 UTC

[jira] Created: (SOLR-670) UpdateHandler must provide a rollback feature

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


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.


[jira] Commented: (SOLR-670) UpdateHandler must provide a rollback feature

Posted by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Updated: (SOLR-670) UpdateHandler must provide a rollback feature

Posted by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-670?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shalin Shekhar Mangar updated SOLR-670:
---------------------------------------

    Attachment: SOLR-670.patch

Forgot to upload the 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.


[jira] Updated: (SOLR-670) UpdateHandler must provide a rollback feature

Posted by "Koji Sekiguchi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-670?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Koji Sekiguchi updated SOLR-670:
--------------------------------

    Attachment: SOLR-670.patch

Updated patch which includes commit and rollback test. The test looks like:

{code:title=pseudo code}
  public void testUncommit() throws Exception {
    add(doc("A"));
    search("A");  // "A" should not be found.
  }

  public void testAddCommit() throws Exception {
    add(doc("A"));
    commit();
    search("A");  // "A" should be found.
  }

  public void testDeleteCommit() throws Exception {
    add(doc("A"));
    add(doc("B"));
    commit();
    search("A OR B");  // "A" and "B" should be found.
    delete(doc("B"));
    search("A OR B");  // "A" and "B" should be found.
    commit();
    search("A OR B");  // "B" should not be found.
  }

  public void testAddRollback() throws Exception {
    add(doc("A"));
    commit();
    add(doc("B"));
    rollback();
    commit();
    search("A OR B");  // "B" should not be found.
  }

  public void testDeleteRollback() throws Exception {
    add(doc("A"));
    add(doc("B"));
    commit();
    search("A OR B");  // "A" and "B" should be found.
    delete(doc("B"));
    rollback();
    commit();
    search("A OR B");  // "A" and "B" should be found.
  }
{code}


> 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
>
>
> 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.


[jira] Resolved: (SOLR-670) UpdateHandler must provide a rollback feature

Posted by "Koji Sekiguchi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-670?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Koji Sekiguchi resolved SOLR-670.
---------------------------------

    Resolution: Fixed

Committed revision 824380.

> 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: Koji Sekiguchi
>             Fix For: 1.4
>
>         Attachments: SOLR-670-revert-cumulative-counts.patch, SOLR-670.patch, SOLR-670.patch, 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.


[jira] Resolved: (SOLR-670) UpdateHandler must provide a rollback feature

Posted by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-670?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shalin Shekhar Mangar resolved SOLR-670.
----------------------------------------

    Resolution: Fixed

Committed revision 704853.

Thanks Noble and Koji!

> 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.


[jira] Commented: (SOLR-670) UpdateHandler must provide a rollback feature

Posted by "Koji Sekiguchi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12672571#action_12672571 ] 

Koji Sekiguchi commented on SOLR-670:
-------------------------------------

Thank you guys. I didn't recall why I didn't set writer=null in the finally block when I wrote the first patch... I'd like to try Shalin's patch, but I couldn't apply it:

{noformat}
[koji@macbook SOLR-670]$ patch -p0 --dry-run < SOLR-670.patch 
patching file src/test/org/apache/solr/update/DirectUpdateHandlerTest.java
Hunk #1 FAILED at 173.
Hunk #2 FAILED at 183.
Hunk #3 FAILED at 229.
Hunk #4 FAILED at 236.
4 out of 4 hunks FAILED -- saving rejects to file src/test/org/apache/solr/update/DirectUpdateHandlerTest.java.rej
patching file src/java/org/apache/solr/update/DirectUpdateHandler2.java
{noformat}


> 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, 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.


[jira] Commented: (SOLR-670) UpdateHandler must provide a rollback feature

Posted by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12639775#action_12639775 ] 

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

Thanks for the patch Koji. Updated with a few changes:

# CSVRequestHandler#handleRequestBody should call handleRollback if streams is null just like it calls handleCommit
# XmlUpdateRequestHandler#handleRequestBody should call handleRollback if streams is null just like it calls handleCommit

Let us think about SolrEventListener changes if users ask for it. Off hand, I can't think of a use-case.

I shall commit this shortly.

> 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
>
>
> 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.


[jira] Updated: (SOLR-670) UpdateHandler must provide a rollback feature

Posted by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-670?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shalin Shekhar Mangar updated SOLR-670:
---------------------------------------

    Attachment: SOLR-670.patch

There was some problem with the previous patch.

Koji, can you please try this one?

> 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, 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.


[jira] Resolved: (SOLR-670) UpdateHandler must provide a rollback feature

Posted by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-670?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shalin Shekhar Mangar resolved SOLR-670.
----------------------------------------

    Resolution: Fixed

Committed revision 743359.

I'll update the wiki with more details on the rollback command.

> 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, 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.


[jira] Updated: (SOLR-670) UpdateHandler must provide a rollback feature

Posted by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-670?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shalin Shekhar Mangar updated SOLR-670:
---------------------------------------

    Attachment: SOLR-670.patch

# Set writer=null in a finally block in DUH2#rollbackWriter so that there is no need to call commit after a rollback
# Update DirectUpdateHandlerTest to not call commit and to make sure we can still add documents.

> 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, 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.


[jira] Updated: (SOLR-670) UpdateHandler must provide a rollback feature

Posted by "Koji Sekiguchi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-670?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Koji Sekiguchi updated SOLR-670:
--------------------------------

    Attachment: SOLR-670.patch

A patch supports the rollback feature.

One question comes up. Is it worthy to have postRollback() method in SolrEventListener? Because SolrEventListener is an interface, if we add the method, it will break back-compat.

> 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
>
>
> 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.


[jira] Reopened: (SOLR-670) UpdateHandler must provide a rollback feature

Posted by "Koji Sekiguchi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-670?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Koji Sekiguchi reopened SOLR-670:
---------------------------------

      Assignee: Koji Sekiguchi  (was: Shalin Shekhar Mangar)

Rollback should reset not only adds/deletesById/deletesByQuery counts but also cumulative counts of them.

> 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: Koji Sekiguchi
>             Fix For: 1.4
>
>         Attachments: SOLR-670.patch, SOLR-670.patch, 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.


[jira] Commented: (SOLR-670) UpdateHandler must provide a rollback feature

Posted by "Otis Gospodnetic (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12672523#action_12672523 ] 

Otis Gospodnetic commented on SOLR-670:
---------------------------------------

That was with Solr trunk (svn up-ed right before trying).
I did not call commit after rollback when that happened, though I *think* I tried adding commit, too, and that didn't do anything either.


> 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.


[jira] Commented: (SOLR-670) UpdateHandler must provide a rollback feature

Posted by "Koji Sekiguchi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12672613#action_12672613 ] 

Koji Sekiguchi commented on SOLR-670:
-------------------------------------

Shalin, the patch looks fine. +1 to commit.

> 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, 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.


[jira] Commented: (SOLR-670) UpdateHandler must provide a rollback feature

Posted by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12672513#action_12672513 ] 

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

Otis, which Solr version are you using or more specifically what is the revision of Lucene jars? Did you call commit after the rollback?

bq. Is it possible that the new rollback causes the IndexWriter to be closed on error, which then causes the following error next time you try to add a (valid) document? 

The javadocs for IndexWriter#rollback do not say anything like that, I'll try to reproduce the problem with trunk.

> 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.


[jira] Reopened: (SOLR-670) UpdateHandler must provide a rollback feature

Posted by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-670?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shalin Shekhar Mangar reopened SOLR-670:
----------------------------------------


Re-opening per above comment

> 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.


[jira] Updated: (SOLR-670) UpdateHandler must provide a rollback feature

Posted by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-670?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shalin Shekhar Mangar updated SOLR-670:
---------------------------------------

    Fix Version/s: 1.4
         Assignee: Shalin Shekhar Mangar

> 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
>
>
> 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.


[jira] Commented: (SOLR-670) UpdateHandler must provide a rollback feature

Posted by "Otis Gospodnetic (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12672441#action_12672441 ] 

Otis Gospodnetic commented on SOLR-670:
---------------------------------------

Is it possible that the new rollback causes the IndexWriter to be closed on error, which then causes the following error next time you try to add a (valid) document?

Feb 10, 2009 5:46:28 PM org.apache.solr.update.processor.LogUpdateProcessor finish
INFO: {} 0 1
Feb 10, 2009 5:46:28 PM org.apache.solr.common.SolrException log
SEVERE: org.apache.lucene.store.AlreadyClosedException: this IndexWriter is closed
	at org.apache.lucene.index.IndexWriter.ensureOpen(IndexWriter.java:397)
	at org.apache.lucene.index.IndexWriter.ensureOpen(IndexWriter.java:402)
	at org.apache.lucene.index.IndexWriter.updateDocument(IndexWriter.java:2108)
	at org.apache.solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.java:218)
	at org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:60)
	at org.apache.solr.handler.XMLLoader.processUpdate(XMLLoader.java:140)
	at org.apache.solr.handler.XMLLoader.load(XMLLoader.java:69)
	at org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:54)
	at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
	at org.apache.solr.core.SolrCore.execute(SolrCore.java:1313)
	at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:303)
	at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:232)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
	at org.mortbay.jetty.Server.handle(Server.java:285)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:502)
	at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:835)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:641)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:202)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378)
	at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226)
	at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)

After rollback is invoked, is one supposed to execute some other command to get Solr in a healthy state?


> 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.


[jira] Updated: (SOLR-670) UpdateHandler must provide a rollback feature

Posted by "Koji Sekiguchi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-670?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Koji Sekiguchi updated SOLR-670:
--------------------------------

    Attachment: SOLR-670-revert-cumulative-counts.patch

The fix and test case. I'll commit soon.

> 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: Koji Sekiguchi
>             Fix For: 1.4
>
>         Attachments: SOLR-670-revert-cumulative-counts.patch, SOLR-670.patch, SOLR-670.patch, 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.