{"action":"created","issue":{"url":"https://api.github.com/repos/CorfuDB/CorfuDB/issues/805","repository_url":"https://api.github.com/repos/CorfuDB/CorfuDB","labels_url":"https://api.github.com/repos/CorfuDB/CorfuDB/issues/805/labels{/name}","comments_url":"https://api.github.com/repos/CorfuDB/CorfuDB/issues/805/comments","events_url":"https://api.github.com/repos/CorfuDB/CorfuDB/issues/805/events","html_url":"https://github.com/CorfuDB/CorfuDB/pull/805","id":240812528,"number":805,"title":"Fix getOptimisticStreamUnsafe() race between optimistic & locked executions","user":{"login":"slfritchie","id":75320,"avatar_url":"https://avatars1.githubusercontent.com/u/75320?v=4","gravatar_id":"","url":"https://api.github.com/users/slfritchie","html_url":"https://github.com/slfritchie","followers_url":"https://api.github.com/users/slfritchie/followers","following_url":"https://api.github.com/users/slfritchie/following{/other_user}","gists_url":"https://api.github.com/users/slfritchie/gists{/gist_id}","starred_url":"https://api.github.com/users/slfritchie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slfritchie/subscriptions","organizations_url":"https://api.github.com/users/slfritchie/orgs","repos_url":"https://api.github.com/users/slfritchie/repos","events_url":"https://api.github.com/users/slfritchie/events{/privacy}","received_events_url":"https://api.github.com/users/slfritchie/received_events","type":"User","site_admin":false},"labels":[{"id":640897304,"url":"https://api.github.com/repos/CorfuDB/CorfuDB/labels/act:%20wait%20to%20merge","name":"act: wait to merge","color":"fbca04","default":false},{"id":647329560,"url":"https://api.github.com/repos/CorfuDB/CorfuDB/labels/risk:%20low","name":"risk: low","color":"e99695","default":false},{"id":57187517,"url":"https://api.github.com/repos/CorfuDB/CorfuDB/labels/typ:%20bug%20fix","name":"typ: bug fix","color":"0e8a16","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-07-06T00:32:56Z","updated_at":"2017-07-25T00:21:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/CorfuDB/CorfuDB/pulls/805","html_url":"https://github.com/CorfuDB/CorfuDB/pull/805","diff_url":"https://github.com/CorfuDB/CorfuDB/pull/805.diff","patch_url":"https://github.com/CorfuDB/CorfuDB/pull/805.patch"},"body":"Prior to this patch, a NullPointerException was possible with use of\r\ngetOptimisticStreamUnsafe()\r\n\r\n1. checking getOptimisticStreamUnsafe() for null\r\n2. using getOptimisticStreamUnsafe()'s result to call a chained method\r\n\r\nThis race condition can happen during optimistic txn execution.\r\nBetween 1 & 2, a second thread can try optimistic txn execution,\r\nfail in a race, then *lock* the object and re-execute.  During\r\nthe re-execution, the optimistic stream pointer is set to null.\r\n\r\nWhen the first thread resumes execution, step 2 will throw\r\nNullPointerException.\r\n\r\nI spent a while rummaging around to see if there's a deeper problem with this race, but I don't think so.  If the optimistic txn takes some action that races with the optimistic stream pointer being set to null by some other thread, that action will be undone when the optimistic txn discovers that its optimistic lock isn't valid.  Reviewers, please double-check."},"comment":{"url":"https://api.github.com/repos/CorfuDB/CorfuDB/issues/comments/317592016","html_url":"https://github.com/CorfuDB/CorfuDB/pull/805#issuecomment-317592016","issue_url":"https://api.github.com/repos/CorfuDB/CorfuDB/issues/805","id":317592016,"user":{"login":"coveralls","id":2354108,"avatar_url":"https://avatars1.githubusercontent.com/u/2354108?v=4","gravatar_id":"","url":"https://api.github.com/users/coveralls","html_url":"https://github.com/coveralls","followers_url":"https://api.github.com/users/coveralls/followers","following_url":"https://api.github.com/users/coveralls/following{/other_user}","gists_url":"https://api.github.com/users/coveralls/gists{/gist_id}","starred_url":"https://api.github.com/users/coveralls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coveralls/subscriptions","organizations_url":"https://api.github.com/users/coveralls/orgs","repos_url":"https://api.github.com/users/coveralls/repos","events_url":"https://api.github.com/users/coveralls/events{/privacy}","received_events_url":"https://api.github.com/users/coveralls/received_events","type":"User","site_admin":false},"created_at":"2017-07-25T00:21:24Z","updated_at":"2017-07-25T00:21:24Z","body":"\n[![Coverage Status](https://coveralls.io/builds/12532194/badge)](https://coveralls.io/builds/12532194)\n\nCoverage increased (+0.1%) to 70.257% when pulling **bca8af4763117bafe39cc1da7793650ac7e74b38 on gh802** into **bd99c379d9365bfaad99ed8860062f67958804da on master**.\n"}}
{"actor":{"display_login":"coveralls"}}