[jira] Created: (SOLR-222) writeLockTimeout doesn't have effect

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (SOLR-222) writeLockTimeout doesn't have effect

Michael Gibney (Jira)
writeLockTimeout doesn't have effect
------------------------------------

                 Key: SOLR-222
                 URL: https://issues.apache.org/jira/browse/SOLR-222
             Project: Solr
          Issue Type: Bug
          Components: update
            Reporter: Koji Sekiguchi
            Priority: Minor


writeLockTimeout is set in SolrIndexWriter.init() method as follows:

if (config.writeLockTimeout != -1) setWriteLockTimeout(config.writeLockTimeout);

but this doesn't have effect because setWriteLockTimeout() is an instance method of IndexWriter and at this moment,
IndexWriter's constructor had already been executed and write.lock had beed obtained in the constructor.

To have effect, we should use IndexWriter.setDefaultWriteLockTimeout() class method before creating SolrIndexWriter instance.

With the attached patch, I moved setWriteLockTimeout() to SolrCore and change it to IndexWriter.setDefaultWriteLockTimeout().
I'm not sure it is an appropriate place, but it works.

regards,


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

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (SOLR-222) writeLockTimeout doesn't have effect

Michael Gibney (Jira)

     [ https://issues.apache.org/jira/browse/SOLR-222?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Koji Sekiguchi updated SOLR-222:
--------------------------------

    Attachment: WriteLockTimeout.patch

the patch attached

> writeLockTimeout doesn't have effect
> ------------------------------------
>
>                 Key: SOLR-222
>                 URL: https://issues.apache.org/jira/browse/SOLR-222
>             Project: Solr
>          Issue Type: Bug
>          Components: update
>            Reporter: Koji Sekiguchi
>            Priority: Minor
>         Attachments: WriteLockTimeout.patch
>
>
> writeLockTimeout is set in SolrIndexWriter.init() method as follows:
> if (config.writeLockTimeout != -1) setWriteLockTimeout(config.writeLockTimeout);
> but this doesn't have effect because setWriteLockTimeout() is an instance method of IndexWriter and at this moment,
> IndexWriter's constructor had already been executed and write.lock had beed obtained in the constructor.
> To have effect, we should use IndexWriter.setDefaultWriteLockTimeout() class method before creating SolrIndexWriter instance.
> With the attached patch, I moved setWriteLockTimeout() to SolrCore and change it to IndexWriter.setDefaultWriteLockTimeout().
> I'm not sure it is an appropriate place, but it works.
> regards,

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (SOLR-222) writeLockTimeout doesn't have effect

Michael Gibney (Jira)
In reply to this post by Michael Gibney (Jira)

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

Yonik Seeley commented on SOLR-222:
-----------------------------------

Thanks, nice catch Koji!

> writeLockTimeout doesn't have effect
> ------------------------------------
>
>                 Key: SOLR-222
>                 URL: https://issues.apache.org/jira/browse/SOLR-222
>             Project: Solr
>          Issue Type: Bug
>          Components: update
>            Reporter: Koji Sekiguchi
>            Priority: Minor
>         Attachments: WriteLockTimeout.patch
>
>
> writeLockTimeout is set in SolrIndexWriter.init() method as follows:
> if (config.writeLockTimeout != -1) setWriteLockTimeout(config.writeLockTimeout);
> but this doesn't have effect because setWriteLockTimeout() is an instance method of IndexWriter and at this moment,
> IndexWriter's constructor had already been executed and write.lock had beed obtained in the constructor.
> To have effect, we should use IndexWriter.setDefaultWriteLockTimeout() class method before creating SolrIndexWriter instance.
> With the attached patch, I moved setWriteLockTimeout() to SolrCore and change it to IndexWriter.setDefaultWriteLockTimeout().
> I'm not sure it is an appropriate place, but it works.
> regards,

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

Reply | Threaded
Open this post in threaded view
|

[jira] Resolved: (SOLR-222) writeLockTimeout doesn't have effect

Michael Gibney (Jira)
In reply to this post by Michael Gibney (Jira)

     [ https://issues.apache.org/jira/browse/SOLR-222?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yonik Seeley resolved SOLR-222.
-------------------------------

    Resolution: Fixed

> writeLockTimeout doesn't have effect
> ------------------------------------
>
>                 Key: SOLR-222
>                 URL: https://issues.apache.org/jira/browse/SOLR-222
>             Project: Solr
>          Issue Type: Bug
>          Components: update
>            Reporter: Koji Sekiguchi
>            Priority: Minor
>         Attachments: WriteLockTimeout.patch
>
>
> writeLockTimeout is set in SolrIndexWriter.init() method as follows:
> if (config.writeLockTimeout != -1) setWriteLockTimeout(config.writeLockTimeout);
> but this doesn't have effect because setWriteLockTimeout() is an instance method of IndexWriter and at this moment,
> IndexWriter's constructor had already been executed and write.lock had beed obtained in the constructor.
> To have effect, we should use IndexWriter.setDefaultWriteLockTimeout() class method before creating SolrIndexWriter instance.
> With the attached patch, I moved setWriteLockTimeout() to SolrCore and change it to IndexWriter.setDefaultWriteLockTimeout().
> I'm not sure it is an appropriate place, but it works.
> regards,

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