You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2006/06/30 15:00:30 UTC
[jira] Created: (LUCENE-621) Default lock timeouts should have
static setter/getters
Default lock timeouts should have static setter/getters
-------------------------------------------------------
Key: LUCENE-621
URL: http://issues.apache.org/jira/browse/LUCENE-621
Project: Lucene - Java
Type: Bug
Components: Index
Versions: 2.0.0
Reporter: Michael McCandless
Priority: Minor
Attachments: IndexWriter.java.diff
We recently stopped using Java system properties to derive defaults for things like the write/commit lock timeout, and switched to getter/setter's across all classes. See here:
http://www.gossamer-threads.com/lists/lucene/java-dev/27447
But, in the case at least of the write lock timeout, because it's marked "public final static", a consumer of this API can no longer change this value before instantiating the IndexWriter. This is because the getter/setter for this is not static, which generally makes sense so you can change the timeout for each instance of IndexWriter. But because IndexWriter on construction uses the timeout value, some uses cases need to change the value before getting an instance of IndexWriter.
This was actually a regression, in that Lucene users lost functionality they previously had, on upgrading.
I would propose that that we add getter/setter for the default value of this timeout, which would be static. I'll attach a patch file.
See this thread for context that led to this issue:
http://www.gossamer-threads.com/lists/lucene/java-dev/37421
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Resolved: (LUCENE-621) Default lock timeouts should have
static setter/getters
Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/LUCENE-621?page=all ]
Hoss Man resolved LUCENE-621:
-----------------------------
Resolution: Fixed
patches applied cleanly with no obvious downsides that I could think of.
commited with some minor javadoc tweaks (added missing "@see" declaration to some javadoc lines in the patch, and aded some new @see declarations to the existing static variables pointing at the new setters)
> Default lock timeouts should have static setter/getters
> -------------------------------------------------------
>
> Key: LUCENE-621
> URL: http://issues.apache.org/jira/browse/LUCENE-621
> Project: Lucene - Java
> Type: Bug
> Components: Index
> Versions: 2.0.0
> Reporter: Michael McCandless
> Priority: Minor
> Attachments: IndexWriter.java.diff, TestIndexWriter.java.diff
>
> We recently stopped using Java system properties to derive defaults for things like the write/commit lock timeout, and switched to getter/setter's across all classes. See here:
> http://www.gossamer-threads.com/lists/lucene/java-dev/27447
> But, in the case at least of the write lock timeout, because it's marked "public final static", a consumer of this API can no longer change this value before instantiating the IndexWriter. This is because the getter/setter for this is not static, which generally makes sense so you can change the timeout for each instance of IndexWriter. But because IndexWriter on construction uses the timeout value, some uses cases need to change the value before getting an instance of IndexWriter.
> This was actually a regression, in that Lucene users lost functionality they previously had, on upgrading.
> I would propose that that we add getter/setter for the default value of this timeout, which would be static. I'll attach a patch file.
> See this thread for context that led to this issue:
> http://www.gossamer-threads.com/lists/lucene/java-dev/37421
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Updated: (LUCENE-621) Default lock timeouts should have
static setter/getters
Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/LUCENE-621?page=all ]
Michael McCandless updated LUCENE-621:
--------------------------------------
Attachment: IndexWriter.java.diff
Small changes to IndexWriter.java to add default (static) getter/setters for COMMIT_LOCK_TIMEOUT and WRITE_LOCK_TIMEOUT.
> Default lock timeouts should have static setter/getters
> -------------------------------------------------------
>
> Key: LUCENE-621
> URL: http://issues.apache.org/jira/browse/LUCENE-621
> Project: Lucene - Java
> Type: Bug
> Components: Index
> Versions: 2.0.0
> Reporter: Michael McCandless
> Priority: Minor
> Attachments: IndexWriter.java.diff
>
> We recently stopped using Java system properties to derive defaults for things like the write/commit lock timeout, and switched to getter/setter's across all classes. See here:
> http://www.gossamer-threads.com/lists/lucene/java-dev/27447
> But, in the case at least of the write lock timeout, because it's marked "public final static", a consumer of this API can no longer change this value before instantiating the IndexWriter. This is because the getter/setter for this is not static, which generally makes sense so you can change the timeout for each instance of IndexWriter. But because IndexWriter on construction uses the timeout value, some uses cases need to change the value before getting an instance of IndexWriter.
> This was actually a regression, in that Lucene users lost functionality they previously had, on upgrading.
> I would propose that that we add getter/setter for the default value of this timeout, which would be static. I'll attach a patch file.
> See this thread for context that led to this issue:
> http://www.gossamer-threads.com/lists/lucene/java-dev/37421
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Commented: (LUCENE-621) Default lock timeouts should have
static setter/getters
Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/LUCENE-621?page=comments#action_12418649 ]
Michael McCandless commented on LUCENE-621:
-------------------------------------------
Another recent thread that noted the regression in Lucene 2.0:
http://www.gossamer-threads.com/lists/lucene/java-user/36561
> Default lock timeouts should have static setter/getters
> -------------------------------------------------------
>
> Key: LUCENE-621
> URL: http://issues.apache.org/jira/browse/LUCENE-621
> Project: Lucene - Java
> Type: Bug
> Components: Index
> Versions: 2.0.0
> Reporter: Michael McCandless
> Priority: Minor
> Attachments: IndexWriter.java.diff, TestIndexWriter.java.diff
>
> We recently stopped using Java system properties to derive defaults for things like the write/commit lock timeout, and switched to getter/setter's across all classes. See here:
> http://www.gossamer-threads.com/lists/lucene/java-dev/27447
> But, in the case at least of the write lock timeout, because it's marked "public final static", a consumer of this API can no longer change this value before instantiating the IndexWriter. This is because the getter/setter for this is not static, which generally makes sense so you can change the timeout for each instance of IndexWriter. But because IndexWriter on construction uses the timeout value, some uses cases need to change the value before getting an instance of IndexWriter.
> This was actually a regression, in that Lucene users lost functionality they previously had, on upgrading.
> I would propose that that we add getter/setter for the default value of this timeout, which would be static. I'll attach a patch file.
> See this thread for context that led to this issue:
> http://www.gossamer-threads.com/lists/lucene/java-dev/37421
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Updated: (LUCENE-621) Default lock timeouts should have
static setter/getters
Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/LUCENE-621?page=all ]
Michael McCandless updated LUCENE-621:
--------------------------------------
Attachment: TestIndexWriter.java.diff
Patch to add calls to the new static default setter/getters into the existing TestIndexWriter unit test.
> Default lock timeouts should have static setter/getters
> -------------------------------------------------------
>
> Key: LUCENE-621
> URL: http://issues.apache.org/jira/browse/LUCENE-621
> Project: Lucene - Java
> Type: Bug
> Components: Index
> Versions: 2.0.0
> Reporter: Michael McCandless
> Priority: Minor
> Attachments: IndexWriter.java.diff, TestIndexWriter.java.diff
>
> We recently stopped using Java system properties to derive defaults for things like the write/commit lock timeout, and switched to getter/setter's across all classes. See here:
> http://www.gossamer-threads.com/lists/lucene/java-dev/27447
> But, in the case at least of the write lock timeout, because it's marked "public final static", a consumer of this API can no longer change this value before instantiating the IndexWriter. This is because the getter/setter for this is not static, which generally makes sense so you can change the timeout for each instance of IndexWriter. But because IndexWriter on construction uses the timeout value, some uses cases need to change the value before getting an instance of IndexWriter.
> This was actually a regression, in that Lucene users lost functionality they previously had, on upgrading.
> I would propose that that we add getter/setter for the default value of this timeout, which would be static. I'll attach a patch file.
> See this thread for context that led to this issue:
> http://www.gossamer-threads.com/lists/lucene/java-dev/37421
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Commented: (LUCENE-621) Default lock timeouts should have
static setter/getters
Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/LUCENE-621?page=comments#action_12418723 ]
Michael McCandless commented on LUCENE-621:
-------------------------------------------
Wow, thanks for the fast resolution here!
> Default lock timeouts should have static setter/getters
> -------------------------------------------------------
>
> Key: LUCENE-621
> URL: http://issues.apache.org/jira/browse/LUCENE-621
> Project: Lucene - Java
> Type: Bug
> Components: Index
> Versions: 2.0.0
> Reporter: Michael McCandless
> Priority: Minor
> Attachments: IndexWriter.java.diff, TestIndexWriter.java.diff
>
> We recently stopped using Java system properties to derive defaults for things like the write/commit lock timeout, and switched to getter/setter's across all classes. See here:
> http://www.gossamer-threads.com/lists/lucene/java-dev/27447
> But, in the case at least of the write lock timeout, because it's marked "public final static", a consumer of this API can no longer change this value before instantiating the IndexWriter. This is because the getter/setter for this is not static, which generally makes sense so you can change the timeout for each instance of IndexWriter. But because IndexWriter on construction uses the timeout value, some uses cases need to change the value before getting an instance of IndexWriter.
> This was actually a regression, in that Lucene users lost functionality they previously had, on upgrading.
> I would propose that that we add getter/setter for the default value of this timeout, which would be static. I'll attach a patch file.
> See this thread for context that led to this issue:
> http://www.gossamer-threads.com/lists/lucene/java-dev/37421
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org