{"action":"created","issue":{"url":"https://api.github.com/repos/neo4j/neo4j/issues/5044","labels_url":"https://api.github.com/repos/neo4j/neo4j/issues/5044/labels{/name}","comments_url":"https://api.github.com/repos/neo4j/neo4j/issues/5044/comments","events_url":"https://api.github.com/repos/neo4j/neo4j/issues/5044/events","html_url":"https://github.com/neo4j/neo4j/pull/5044","id":97682840,"number":5044,"title":"Load entity data on write after having acquired an exclusive lock","user":{"login":"davidegrohmann","id":6573166,"avatar_url":"https://avatars.githubusercontent.com/u/6573166?v=3","gravatar_id":"","url":"https://api.github.com/users/davidegrohmann","html_url":"https://github.com/davidegrohmann","followers_url":"https://api.github.com/users/davidegrohmann/followers","following_url":"https://api.github.com/users/davidegrohmann/following{/other_user}","gists_url":"https://api.github.com/users/davidegrohmann/gists{/gist_id}","starred_url":"https://api.github.com/users/davidegrohmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidegrohmann/subscriptions","organizations_url":"https://api.github.com/users/davidegrohmann/orgs","repos_url":"https://api.github.com/users/davidegrohmann/repos","events_url":"https://api.github.com/users/davidegrohmann/events{/privacy}","received_events_url":"https://api.github.com/users/davidegrohmann/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/neo4j/neo4j/labels/2.3","name":"2.3","color":"5319e7"},{"url":"https://api.github.com/repos/neo4j/neo4j/labels/kernel","name":"kernel","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-28T11:35:30Z","updated_at":"2015-07-28T11:42:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/neo4j/neo4j/pulls/5044","html_url":"https://github.com/neo4j/neo4j/pull/5044","diff_url":"https://github.com/neo4j/neo4j/pull/5044.diff","patch_url":"https://github.com/neo4j/neo4j/pull/5044.patch"},"body":"The problem was that multiple threads modifying the same entity could corrupt the data.\r\n\r\nAs an example consider the following case with 2 threads:\r\n- both threads load the same node record from disk (having no properties)\r\n- first thread grabs the lock first and add a property \"a\" with value 42\r\n- second thread waiting on the lock\r\n- first thread release the lock\r\n- second thread add a property \"a\" with vale 33 to the same node since the second thread thinks there are no properties on the node it adds a new property instead modifying the one already there\r\n- there are duplicated properties in the property chain\r\n\r\nSimilar problems happened for writing properties on relationships and adding same labels on nodes."},"comment":{"url":"https://api.github.com/repos/neo4j/neo4j/issues/comments/125570158","html_url":"https://github.com/neo4j/neo4j/pull/5044#issuecomment-125570158","issue_url":"https://api.github.com/repos/neo4j/neo4j/issues/5044","id":125570158,"user":{"login":"thobe","id":104385,"avatar_url":"https://avatars.githubusercontent.com/u/104385?v=3","gravatar_id":"","url":"https://api.github.com/users/thobe","html_url":"https://github.com/thobe","followers_url":"https://api.github.com/users/thobe/followers","following_url":"https://api.github.com/users/thobe/following{/other_user}","gists_url":"https://api.github.com/users/thobe/gists{/gist_id}","starred_url":"https://api.github.com/users/thobe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thobe/subscriptions","organizations_url":"https://api.github.com/users/thobe/orgs","repos_url":"https://api.github.com/users/thobe/repos","events_url":"https://api.github.com/users/thobe/events{/privacy}","received_events_url":"https://api.github.com/users/thobe/received_events","type":"User","site_admin":false},"created_at":"2015-07-28T11:42:28Z","updated_at":"2015-07-28T11:42:28Z","body":"This sounds really severe. Are you sure the scenarios that trigger this really need the property key to be the same from both threads?"}}