You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Mark Miller (JIRA)" <ji...@apache.org> on 2013/07/14 15:20:48 UTC

[jira] [Commented] (SOLR-5040) SnapShooter doesn't create a lock as it runs

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

Mark Miller commented on SOLR-5040:
-----------------------------------

Nice catch, indeed there is something wrong with that code.

I guess the question is, what is the right behavior? Do we really need that lock? Why not allow multiple calls to proceed in parallel? If they should not, what's the best behavior? It seems now it just would return silently? Shouldn't it log an error? Report failure to the caller? It actually looks like snapshot requests return right away, regardless of how the snapshot proceeds - perhaps it should wait until the snapshot is done like a lot of our other commands that might take a while? (commit, optimize, etc).
                
> SnapShooter doesn't create a lock as it runs
> --------------------------------------------
>
>                 Key: SOLR-5040
>                 URL: https://issues.apache.org/jira/browse/SOLR-5040
>             Project: Solr
>          Issue Type: Bug
>          Components: replication (java)
>            Reporter: Mark Triggs
>            Priority: Trivial
>         Attachments: snapshooter-locking.diff
>
>
> Hi there,
> While messing around with the replication handler recently, I noticed that the snapshooter didn't seem to be writing a lock file.  I had a look at the SnapShooter.java code, and to my untrained eye it seemed like it was creating a Lock object but never actually taking a lock.
> I modified my local installation to use lock.obtain() instead of lock.isLocked() and verified that I'm now seeing lock files.  I've attached a very small patch just in case this is a genuine bug.
> Cheers,
> Mark

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