You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Scott Garland (JIRA)" <ji...@apache.org> on 2009/03/05 01:45:56 UTC
[jira] Created: (LUCENE-1553) ConcurrentScheduleManager.addMyself()
has wrong inted
ConcurrentScheduleManager.addMyself() has wrong inted
-----------------------------------------------------
Key: LUCENE-1553
URL: https://issues.apache.org/jira/browse/LUCENE-1553
Project: Lucene - Java
Issue Type: Bug
Affects Versions: 2.4
Reporter: Scott Garland
Priority: Minor
This method has the wrong index for the 'size' variable, I think it should b allInstances.size.
{code:java}
private void addMyself() {
synchronized(allInstances) {
final int size=0;
int upto = 0;
for(int i=0;i<size;i++) {
final ConcurrentMergeScheduler other = (ConcurrentMergeScheduler) allInstances.get(i);
if (!(other.closed && 0 == other.mergeThreadCount()))
// Keep this one for now: it still has threads or
// may spawn new threads
allInstances.set(upto++, other);
}
allInstances.subList(upto, allInstances.size()).clear();
allInstances.add(this);
}
}
{code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Resolved: (LUCENE-1553)
ConcurrentScheduleManager.addMyself() has wrong inted
Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1553?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael McCandless resolved LUCENE-1553.
----------------------------------------
Resolution: Fixed
Fix Version/s: 2.9
> ConcurrentScheduleManager.addMyself() has wrong inted
> -----------------------------------------------------
>
> Key: LUCENE-1553
> URL: https://issues.apache.org/jira/browse/LUCENE-1553
> Project: Lucene - Java
> Issue Type: Bug
> Affects Versions: 2.4
> Reporter: Scott Garland
> Assignee: Michael McCandless
> Priority: Minor
> Fix For: 2.9
>
>
> This method has the wrong index for the 'size' variable, I think it should b allInstances.size.
> {code:java}
> private void addMyself() {
> synchronized(allInstances) {
> final int size=0;
> int upto = 0;
> for(int i=0;i<size;i++) {
> final ConcurrentMergeScheduler other = (ConcurrentMergeScheduler) allInstances.get(i);
> if (!(other.closed && 0 == other.mergeThreadCount()))
> // Keep this one for now: it still has threads or
> // may spawn new threads
> allInstances.set(upto++, other);
> }
> allInstances.subList(upto, allInstances.size()).clear();
> allInstances.add(this);
> }
> }
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Assigned: (LUCENE-1553)
ConcurrentScheduleManager.addMyself() has wrong inted
Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1553?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael McCandless reassigned LUCENE-1553:
------------------------------------------
Assignee: Michael McCandless
> ConcurrentScheduleManager.addMyself() has wrong inted
> -----------------------------------------------------
>
> Key: LUCENE-1553
> URL: https://issues.apache.org/jira/browse/LUCENE-1553
> Project: Lucene - Java
> Issue Type: Bug
> Affects Versions: 2.4
> Reporter: Scott Garland
> Assignee: Michael McCandless
> Priority: Minor
>
> This method has the wrong index for the 'size' variable, I think it should b allInstances.size.
> {code:java}
> private void addMyself() {
> synchronized(allInstances) {
> final int size=0;
> int upto = 0;
> for(int i=0;i<size;i++) {
> final ConcurrentMergeScheduler other = (ConcurrentMergeScheduler) allInstances.get(i);
> if (!(other.closed && 0 == other.mergeThreadCount()))
> // Keep this one for now: it still has threads or
> // may spawn new threads
> allInstances.set(upto++, other);
> }
> allInstances.subList(upto, allInstances.size()).clear();
> allInstances.add(this);
> }
> }
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Commented: (LUCENE-1553)
ConcurrentScheduleManager.addMyself() has wrong inted
Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12679137#action_12679137 ]
Michael McCandless commented on LUCENE-1553:
--------------------------------------------
Good catch, thanks Scott! I'll commit shortly.
This is only used by unit tests, to ensure that a test fails whenever ConcurrentMergeScheduler hits an unhandled exception.
> ConcurrentScheduleManager.addMyself() has wrong inted
> -----------------------------------------------------
>
> Key: LUCENE-1553
> URL: https://issues.apache.org/jira/browse/LUCENE-1553
> Project: Lucene - Java
> Issue Type: Bug
> Affects Versions: 2.4
> Reporter: Scott Garland
> Assignee: Michael McCandless
> Priority: Minor
> Fix For: 2.9
>
>
> This method has the wrong index for the 'size' variable, I think it should b allInstances.size.
> {code:java}
> private void addMyself() {
> synchronized(allInstances) {
> final int size=0;
> int upto = 0;
> for(int i=0;i<size;i++) {
> final ConcurrentMergeScheduler other = (ConcurrentMergeScheduler) allInstances.get(i);
> if (!(other.closed && 0 == other.mergeThreadCount()))
> // Keep this one for now: it still has threads or
> // may spawn new threads
> allInstances.set(upto++, other);
> }
> allInstances.subList(upto, allInstances.size()).clear();
> allInstances.add(this);
> }
> }
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org