{"action":"created","issue":{"url":"https://api.github.com/repos/candlepin/candlepin/issues/1158","repository_url":"https://api.github.com/repos/candlepin/candlepin","labels_url":"https://api.github.com/repos/candlepin/candlepin/issues/1158/labels{/name}","comments_url":"https://api.github.com/repos/candlepin/candlepin/issues/1158/comments","events_url":"https://api.github.com/repos/candlepin/candlepin/issues/1158/events","html_url":"https://github.com/candlepin/candlepin/pull/1158","id":144254642,"number":1158,"title":"Fixed Optimistic Lock issue with ConsumerComplianceJob","user":{"login":"mstead","id":218800,"avatar_url":"https://avatars.githubusercontent.com/u/218800?v=3","gravatar_id":"","url":"https://api.github.com/users/mstead","html_url":"https://github.com/mstead","followers_url":"https://api.github.com/users/mstead/followers","following_url":"https://api.github.com/users/mstead/following{/other_user}","gists_url":"https://api.github.com/users/mstead/gists{/gist_id}","starred_url":"https://api.github.com/users/mstead/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mstead/subscriptions","organizations_url":"https://api.github.com/users/mstead/orgs","repos_url":"https://api.github.com/users/mstead/repos","events_url":"https://api.github.com/users/mstead/events{/privacy}","received_events_url":"https://api.github.com/users/mstead/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"vritant","id":2501280,"avatar_url":"https://avatars.githubusercontent.com/u/2501280?v=3","gravatar_id":"","url":"https://api.github.com/users/vritant","html_url":"https://github.com/vritant","followers_url":"https://api.github.com/users/vritant/followers","following_url":"https://api.github.com/users/vritant/following{/other_user}","gists_url":"https://api.github.com/users/vritant/gists{/gist_id}","starred_url":"https://api.github.com/users/vritant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vritant/subscriptions","organizations_url":"https://api.github.com/users/vritant/orgs","repos_url":"https://api.github.com/users/vritant/repos","events_url":"https://api.github.com/users/vritant/events{/privacy}","received_events_url":"https://api.github.com/users/vritant/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2016-03-29T12:47:22Z","updated_at":"2016-03-31T15:37:33Z","closed_at":"2016-03-31T15:37:02Z","pull_request":{"url":"https://api.github.com/repos/candlepin/candlepin/pulls/1158","html_url":"https://github.com/candlepin/candlepin/pull/1158","diff_url":"https://github.com/candlepin/candlepin/pull/1158.diff","patch_url":"https://github.com/candlepin/candlepin/pull/1158.patch"},"body":"If a consumer was updated or deleted before the job was run\r\nan OptimisticLockException was thrown and the job would fail.\r\nLosing a compliance can be problematic as the consumer\r\nstatus would be out of date.\r\n\r\nThe OLE would occur if the consumer was updated/deleted after\r\nit was looked up and before it was locked.\r\n\r\nThis PR locks the consumer isntance on lookup, eliminating the\r\ngap between fetch and lock.\r\n\r\nIf the Consumer does not exist, the job will now finish\r\nsuccessfully with an appropriate result message stating that\r\nthe targeted consumer could no longer be found."},"comment":{"url":"https://api.github.com/repos/candlepin/candlepin/issues/comments/203989688","html_url":"https://github.com/candlepin/candlepin/pull/1158#issuecomment-203989688","issue_url":"https://api.github.com/repos/candlepin/candlepin/issues/1158","id":203989688,"user":{"login":"vritant","id":2501280,"avatar_url":"https://avatars.githubusercontent.com/u/2501280?v=3","gravatar_id":"","url":"https://api.github.com/users/vritant","html_url":"https://github.com/vritant","followers_url":"https://api.github.com/users/vritant/followers","following_url":"https://api.github.com/users/vritant/following{/other_user}","gists_url":"https://api.github.com/users/vritant/gists{/gist_id}","starred_url":"https://api.github.com/users/vritant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vritant/subscriptions","organizations_url":"https://api.github.com/users/vritant/orgs","repos_url":"https://api.github.com/users/vritant/repos","events_url":"https://api.github.com/users/vritant/events{/privacy}","received_events_url":"https://api.github.com/users/vritant/received_events","type":"User","site_admin":false},"created_at":"2016-03-31T15:37:33Z","updated_at":"2016-03-31T15:37:33Z","body":"@mstead merged, thanks for fixing my mess :)"}}