Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConcurrentModificationException when requesting the database size #7149

Closed
jbilcke opened this issue Feb 4, 2017 · 2 comments
Closed

ConcurrentModificationException when requesting the database size #7149

jbilcke opened this issue Feb 4, 2017 · 2 comments
Assignees
Labels
Milestone

Comments

@jbilcke
Copy link

jbilcke commented Feb 4, 2017

OrientDB Version: v2.2.2

Java Version: Java 8 Update 111

OS: macOS Sierra 10.12.2

My app uses OrientJS to communicate with OrientDB using the REST API.
Their both run on the same machine, and there is only one single OrientDB instance.

Expected behavior

Return the size of the database

Actual behavior

Sometimes it return the db size, but sometimes there is:

 Error executing request
java.util.ConcurrentModificationException
  at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:901)
  at java.util.ArrayList$Itr.next(ArrayList.java:851)
  at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.getSize(OAbstractPaginatedStorage.java:2347)
  at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.sizeDatabase(ONetworkProtocolBinary.java:1069)
  at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.executeRequest(ONetworkProtocolBinary.java:373)
  at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.execute(ONetworkProtocolBinary.java:199)
  at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:77)

Steps to reproduce

What my app does is upserting +20k items in the database (using the rest api) while regularly asking for the db size at the same time, in parallel. Sometimes it works, sometimes there is this exception.

Is that allowed/possible? or is there another way?

@lvca lvca self-assigned this Feb 6, 2017
@lvca lvca added this to the 2.2.x (next hotfix) milestone Feb 6, 2017
@lvca lvca added the bug label Feb 6, 2017
@lvca
Copy link
Member

lvca commented Feb 6, 2017

Fixed in 2.2.x branch. it will be part of the next 2.2.17, but you can already use a build from the branch 2.2.x. Thanks.

@lvca lvca closed this as completed Feb 6, 2017
@lvca lvca modified the milestones: 2.2.17, 2.2.x (next hotfix) Feb 6, 2017
@jbilcke
Copy link
Author

jbilcke commented Feb 6, 2017

woa! thank you! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants