{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/12369","labels_url":"https://api.github.com/repos/docker/docker/issues/12369/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/12369/comments","events_url":"https://api.github.com/repos/docker/docker/issues/12369/events","html_url":"https://github.com/docker/docker/pull/12369","id":68355515,"number":12369,"title":"Fix wrong graphdb refs paths purging","user":{"login":"runcom","id":849915,"avatar_url":"https://avatars.githubusercontent.com/u/849915?v=3","gravatar_id":"","url":"https://api.github.com/users/runcom","html_url":"https://github.com/runcom","followers_url":"https://api.github.com/users/runcom/followers","following_url":"https://api.github.com/users/runcom/following{/other_user}","gists_url":"https://api.github.com/users/runcom/gists{/gist_id}","starred_url":"https://api.github.com/users/runcom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/runcom/subscriptions","organizations_url":"https://api.github.com/users/runcom/orgs","repos_url":"https://api.github.com/users/runcom/repos","events_url":"https://api.github.com/users/runcom/events{/privacy}","received_events_url":"https://api.github.com/users/runcom/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels/dco/yes","name":"dco/yes","color":"ededed"},{"url":"https://api.github.com/repos/docker/docker/labels/status/2-needs-code-review","name":"status/2-needs-code-review","color":"fad8c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-04-14T12:25:01Z","updated_at":"2015-04-15T18:34:53Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/12369","html_url":"https://github.com/docker/docker/pull/12369","diff_url":"https://github.com/docker/docker/pull/12369.diff","patch_url":"https://github.com/docker/docker/pull/12369.patch"},"body":"Fixes: #12334\r\n\r\nWhen deleting (purging) a container, linked containers were not updating correctly meaning they were left with the `parent_id` referencing a deleted container.\r\nThe solution is to just delete the edge (container) that has `parent_id` referencing to the deleted container. Updating this row is not necessary because there's just a row for that container.\r\n\r\nMaybe this let you undestand better.\r\nAfter `docker run -d --name fixgraph busybox top` and `docker run -d --name fixgraphtest --link fixgraph:fixgraph busybox` run, the sqlite db looks like this:\r\n\r\n![Pre](https://i.imgur.com/QUf7wpw.png)\r\n\r\nAfter `docker rm fixgraphtest` the table looks like:\r\n\r\n![Post](https://i.imgur.com/FPN6yy1.png)\r\n\r\nSo due to to row `258` is still there the error in the issue is thrown. Hence this fix.\r\n\r\nHope this won't break something because it seems to not have showed up till now even if this error was present in previous release (tested on both 1.6.0-rc5/6 and stock 1.5.0). Also I'm not aware if leaving that row was intentional for debugging purpose or something else. \r\n\r\nI'll add a regression test asap if this is confirmed.\r\n\r\n/cc @cpuguy83 @LK4D4 @crosbymichael \r\n\r\nSigned-off-by: Antonio Murdaca <me@runcom.ninja>"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/93524624","html_url":"https://github.com/docker/docker/pull/12369#issuecomment-93524624","issue_url":"https://api.github.com/repos/docker/docker/issues/12369","id":93524624,"user":{"login":"LK4D4","id":101445,"avatar_url":"https://avatars.githubusercontent.com/u/101445?v=3","gravatar_id":"","url":"https://api.github.com/users/LK4D4","html_url":"https://github.com/LK4D4","followers_url":"https://api.github.com/users/LK4D4/followers","following_url":"https://api.github.com/users/LK4D4/following{/other_user}","gists_url":"https://api.github.com/users/LK4D4/gists{/gist_id}","starred_url":"https://api.github.com/users/LK4D4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LK4D4/subscriptions","organizations_url":"https://api.github.com/users/LK4D4/orgs","repos_url":"https://api.github.com/users/LK4D4/repos","events_url":"https://api.github.com/users/LK4D4/events{/privacy}","received_events_url":"https://api.github.com/users/LK4D4/received_events","type":"User","site_admin":false},"created_at":"2015-04-15T18:34:53Z","updated_at":"2015-04-15T18:34:53Z","body":"LGTM"}}