{"action":"opened","issue":{"url":"https://api.github.com/repos/lcache/lcache/issues/47","repository_url":"https://api.github.com/repos/lcache/lcache","labels_url":"https://api.github.com/repos/lcache/lcache/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/lcache/lcache/issues/47/comments","events_url":"https://api.github.com/repos/lcache/lcache/issues/47/events","html_url":"https://github.com/lcache/lcache/issues/47","id":181855510,"number":47,"title":"Redundant set in excess overhead case - Integrated::set()","user":{"login":"DeanMarkTaylor","id":52425,"avatar_url":"https://avatars.githubusercontent.com/u/52425?v=3","gravatar_id":"","url":"https://api.github.com/users/DeanMarkTaylor","html_url":"https://github.com/DeanMarkTaylor","followers_url":"https://api.github.com/users/DeanMarkTaylor/followers","following_url":"https://api.github.com/users/DeanMarkTaylor/following{/other_user}","gists_url":"https://api.github.com/users/DeanMarkTaylor/gists{/gist_id}","starred_url":"https://api.github.com/users/DeanMarkTaylor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DeanMarkTaylor/subscriptions","organizations_url":"https://api.github.com/users/DeanMarkTaylor/orgs","repos_url":"https://api.github.com/users/DeanMarkTaylor/repos","events_url":"https://api.github.com/users/DeanMarkTaylor/events{/privacy}","received_events_url":"https://api.github.com/users/DeanMarkTaylor/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-08T23:59:41Z","updated_at":"2016-10-08T23:59:41Z","closed_at":null,"body":"Following up on my comment regarding code / line:\r\nhttps://github.com/lcache/lcache/blob/master/src/Integrated.php#L44\r\n```\r\n                $event_id = $this->l2->delete($this->l1->getPool(), $address);\r\n                if (!is_null($event_id)) {\r\n                    $this->l1->set($event_id, $address, $value, $expiration);\r\n                }\r\n```\r\n\r\n\r\nhttps://github.com/lcache/lcache/commit/d38ada26ee8e5522b7b7840d47476a3c3d5d58f3#commitcomment-19344043\r\n\r\n> It's possible for $this->l1->set and then $this->l1->setWithExpiration to be called immediately after, is this expected here?\r\n\r\nhttps://github.com/lcache/lcache/commit/d38ada26ee8e5522b7b7840d47476a3c3d5d58f3#commitcomment-19345176\r\n\r\n> You're right. It looks like it's likely a redundant set in the excess overhead case. Would you mind filing an issue so we can (1) add a corresponding unit test and (2) fix the code? It looks like there's risk of setting to the L1 with a null event ID from the L2 deletion if the L2 deletion fails.\r\n"}}
{"actor":{"display_login":"DeanMarkTaylor"}}