{"action":"created","issue":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/6851","repository_url":"https://api.github.com/repos/orientechnologies/orientdb","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/6851/labels{/name}","comments_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/6851/comments","events_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/6851/events","html_url":"https://github.com/orientechnologies/orientdb/issues/6851","id":185544307,"number":6851,"title":"row updated on OConcurrentModificationException","user":{"login":"smallik","id":766776,"avatar_url":"https://avatars.githubusercontent.com/u/766776?v=3","gravatar_id":"","url":"https://api.github.com/users/smallik","html_url":"https://github.com/smallik","followers_url":"https://api.github.com/users/smallik/followers","following_url":"https://api.github.com/users/smallik/following{/other_user}","gists_url":"https://api.github.com/users/smallik/gists{/gist_id}","starred_url":"https://api.github.com/users/smallik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smallik/subscriptions","organizations_url":"https://api.github.com/users/smallik/orgs","repos_url":"https://api.github.com/users/smallik/repos","events_url":"https://api.github.com/users/smallik/events{/privacy}","received_events_url":"https://api.github.com/users/smallik/received_events","type":"User","site_admin":false},"labels":[{"id":197557840,"url":"https://api.github.com/repos/orientechnologies/orientdb/labels/bug","name":"bug","color":"fc2929","default":true},{"id":88441739,"url":"https://api.github.com/repos/orientechnologies/orientdb/labels/in%20progress","name":"in progress","color":"CCCCCC","default":false},{"id":356638774,"url":"https://api.github.com/repos/orientechnologies/orientdb/labels/storage%20team","name":"storage team","color":"c5def5","default":false}],"state":"open","locked":false,"assignee":{"login":"taburet","id":1912884,"avatar_url":"https://avatars.githubusercontent.com/u/1912884?v=3","gravatar_id":"","url":"https://api.github.com/users/taburet","html_url":"https://github.com/taburet","followers_url":"https://api.github.com/users/taburet/followers","following_url":"https://api.github.com/users/taburet/following{/other_user}","gists_url":"https://api.github.com/users/taburet/gists{/gist_id}","starred_url":"https://api.github.com/users/taburet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taburet/subscriptions","organizations_url":"https://api.github.com/users/taburet/orgs","repos_url":"https://api.github.com/users/taburet/repos","events_url":"https://api.github.com/users/taburet/events{/privacy}","received_events_url":"https://api.github.com/users/taburet/received_events","type":"User","site_admin":false},"assignees":[{"login":"taburet","id":1912884,"avatar_url":"https://avatars.githubusercontent.com/u/1912884?v=3","gravatar_id":"","url":"https://api.github.com/users/taburet","html_url":"https://github.com/taburet","followers_url":"https://api.github.com/users/taburet/followers","following_url":"https://api.github.com/users/taburet/following{/other_user}","gists_url":"https://api.github.com/users/taburet/gists{/gist_id}","starred_url":"https://api.github.com/users/taburet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taburet/subscriptions","organizations_url":"https://api.github.com/users/taburet/orgs","repos_url":"https://api.github.com/users/taburet/repos","events_url":"https://api.github.com/users/taburet/events{/privacy}","received_events_url":"https://api.github.com/users/taburet/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/orientechnologies/orientdb/milestones/88","html_url":"https://github.com/orientechnologies/orientdb/milestones/2.2.x%20(next%20hotfix)","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/milestones/88/labels","id":1768027,"number":88,"title":"2.2.x (next hotfix)","description":"","creator":{"login":"robfrank","id":413587,"avatar_url":"https://avatars.githubusercontent.com/u/413587?v=3","gravatar_id":"","url":"https://api.github.com/users/robfrank","html_url":"https://github.com/robfrank","followers_url":"https://api.github.com/users/robfrank/followers","following_url":"https://api.github.com/users/robfrank/following{/other_user}","gists_url":"https://api.github.com/users/robfrank/gists{/gist_id}","starred_url":"https://api.github.com/users/robfrank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robfrank/subscriptions","organizations_url":"https://api.github.com/users/robfrank/orgs","repos_url":"https://api.github.com/users/robfrank/repos","events_url":"https://api.github.com/users/robfrank/events{/privacy}","received_events_url":"https://api.github.com/users/robfrank/received_events","type":"User","site_admin":false},"open_issues":153,"closed_issues":21,"state":"open","created_at":"2016-05-16T08:28:14Z","updated_at":"2016-11-03T10:48:49Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2016-10-27T00:24:20Z","updated_at":"2016-11-03T11:32:49Z","closed_at":null,"body":"## OrientDB Version, operating system, or hardware.\n- v2.2.7, Windows 10, laptop\n## Operating System\n- [x ] Windows\n## Expected behavior and actual behavior\n\nThe below query is throwing OConcurrentModificationException while calling commit. but the record is still updated. \n\nupdate crud_log set status = 'processed' return after where entity='user' crud_type = 'create' and status = 'unread' limit 20\n\nupdate crud_log set status = 'processed' return after where entity='user' crud_type = 'create' and status = 'unread' limit 20\n## Steps to reproduce the problem\n\nbelow is the table and data:\n\n<name>,<entity>,<crud_type>,<status>\nlee,user,create,processed\nkhan,user,create,processed\nchad,user,create,processed\ntim,user,create,processed\nsteve,user,create,unread\n\nQuery used:\nupdate crud_log set status = 'processed' return after where entity='user' crud_type = 'create' and status = 'unread' limit 20\n\nCode user to call query:\nList<ODocument> result = graph.getRawGraph().command(new OCommandSQL(query)).execute();\n\nCommit method code: \n(this method is always returning false, we call rollback when falls is returned, but the row is updated)\n        boolean commit=false;\n        if(graph!=null){\n            int maxRetries = 20;\n            for (int retry = 0; retry < maxRetries; ++retry) {\n                try{\n                    graph.commit();\n                    commit=true;\n                    //exit from retry loop\n                    break;\n                }catch( OConcurrentModificationException e ) {\n                    //retry;\n                }\n            }\n            graph=null;\n        } else {\n            this.setError(\"cannot commit. database is null\");\n        }\n               return commit;\n"},"comment":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/comments/258119437","html_url":"https://github.com/orientechnologies/orientdb/issues/6851#issuecomment-258119437","issue_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/6851","id":258119437,"user":{"login":"taburet","id":1912884,"avatar_url":"https://avatars.githubusercontent.com/u/1912884?v=3","gravatar_id":"","url":"https://api.github.com/users/taburet","html_url":"https://github.com/taburet","followers_url":"https://api.github.com/users/taburet/followers","following_url":"https://api.github.com/users/taburet/following{/other_user}","gists_url":"https://api.github.com/users/taburet/gists{/gist_id}","starred_url":"https://api.github.com/users/taburet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taburet/subscriptions","organizations_url":"https://api.github.com/users/taburet/orgs","repos_url":"https://api.github.com/users/taburet/repos","events_url":"https://api.github.com/users/taburet/events{/privacy}","received_events_url":"https://api.github.com/users/taburet/received_events","type":"User","site_admin":false},"created_at":"2016-11-03T11:32:49Z","updated_at":"2016-11-03T11:32:49Z","body":"Just to clarify the situation, how you noticed that the rows was updated by the thread calling the provided code? Maybe it was updated by the other thread? What kind of a database access you use, embedded/server/distributed server?"}}
{"actor":{"display_login":"taburet"}}