You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Christan Keller (Created) (JIRA)" <ji...@apache.org> on 2012/02/02 17:52:52 UTC
[jira] [Created] (JCR-3225) ConcurrentModificationException in
QueryStatImpl
ConcurrentModificationException in QueryStatImpl
------------------------------------------------
Key: JCR-3225
URL: https://issues.apache.org/jira/browse/JCR-3225
Project: Jackrabbit Content Repository
Issue Type: Bug
Components: jackrabbit-core
Affects Versions: 2.3.7, 2.3.6
Reporter: Christan Keller
Running with qurystats enabled the Query#execute can throw ConcurrentModificationException
caused by the iterator which backing collection is changed from another thread
see logQuery method
Iterator<QueryStatDtoImpl> iterator = popularQueries.iterator();
while (iterator.hasNext()) {
--> QueryStatDtoImpl qsdi = iterator.next();
if (qsdi.equals(qs)) {
qs.setOccurrenceCount(qsdi.getOccurrenceCount() + 1);
iterator.remove();
break;
}
}
popularQueries.offer(qs);
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (JCR-3225) ConcurrentModificationException in
QueryStatImpl
Posted by "Alex Parvulescu (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-3225?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alex Parvulescu resolved JCR-3225.
----------------------------------
Resolution: Fixed
Fix Version/s: 2.4
I wasn't able to see the ConcurrentModificationException, but I saw another one on #getPopularQueries: ArrayIndexOutOfBoundsException.
I added some synchronization code to the 2 methods.
Fixed in rev: 1240053.
> ConcurrentModificationException in QueryStatImpl
> ------------------------------------------------
>
> Key: JCR-3225
> URL: https://issues.apache.org/jira/browse/JCR-3225
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Components: jackrabbit-core
> Affects Versions: 2.3.6, 2.3.7
> Reporter: Christan Keller
> Fix For: 2.4
>
>
> Running with qurystats enabled the Query#execute can throw ConcurrentModificationException
> caused by the iterator which backing collection is changed from another thread
> see logQuery method
> Iterator<QueryStatDtoImpl> iterator = popularQueries.iterator();
> while (iterator.hasNext()) {
> --> QueryStatDtoImpl qsdi = iterator.next();
> if (qsdi.equals(qs)) {
> qs.setOccurrenceCount(qsdi.getOccurrenceCount() + 1);
> iterator.remove();
> break;
> }
> }
> popularQueries.offer(qs);
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (JCR-3225) ConcurrentModificationException in
QueryStatImpl
Posted by "Jukka Zitting (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-3225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13199632#comment-13199632 ]
Jukka Zitting commented on JCR-3225:
------------------------------------
Merged to the 2.4 branch in revision 1240068.
> ConcurrentModificationException in QueryStatImpl
> ------------------------------------------------
>
> Key: JCR-3225
> URL: https://issues.apache.org/jira/browse/JCR-3225
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Components: jackrabbit-core
> Affects Versions: 2.3.6, 2.3.7
> Reporter: Christan Keller
> Fix For: 2.4
>
>
> Running with qurystats enabled the Query#execute can throw ConcurrentModificationException
> caused by the iterator which backing collection is changed from another thread
> see logQuery method
> Iterator<QueryStatDtoImpl> iterator = popularQueries.iterator();
> while (iterator.hasNext()) {
> --> QueryStatDtoImpl qsdi = iterator.next();
> if (qsdi.equals(qs)) {
> qs.setOccurrenceCount(qsdi.getOccurrenceCount() + 1);
> iterator.remove();
> break;
> }
> }
> popularQueries.offer(qs);
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira