{"action":"closed","issue":{"url":"https://api.github.com/repos/deployd/deployd/issues/653","repository_url":"https://api.github.com/repos/deployd/deployd","labels_url":"https://api.github.com/repos/deployd/deployd/issues/653/labels{/name}","comments_url":"https://api.github.com/repos/deployd/deployd/issues/653/comments","events_url":"https://api.github.com/repos/deployd/deployd/issues/653/events","html_url":"https://github.com/deployd/deployd/issues/653","id":111981430,"number":653,"title":"Race condition when inserting an object in DB","user":{"login":"NicolasRitouet","id":205134,"avatar_url":"https://avatars.githubusercontent.com/u/205134?v=3","gravatar_id":"","url":"https://api.github.com/users/NicolasRitouet","html_url":"https://github.com/NicolasRitouet","followers_url":"https://api.github.com/users/NicolasRitouet/followers","following_url":"https://api.github.com/users/NicolasRitouet/following{/other_user}","gists_url":"https://api.github.com/users/NicolasRitouet/gists{/gist_id}","starred_url":"https://api.github.com/users/NicolasRitouet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NicolasRitouet/subscriptions","organizations_url":"https://api.github.com/users/NicolasRitouet/orgs","repos_url":"https://api.github.com/users/NicolasRitouet/repos","events_url":"https://api.github.com/users/NicolasRitouet/events{/privacy}","received_events_url":"https://api.github.com/users/NicolasRitouet/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/deployd/deployd/labels/component:%20datastore","name":"component: datastore","color":"bfe5bf"},{"url":"https://api.github.com/repos/deployd/deployd/labels/needs:%20Pull%20Request","name":"needs: Pull Request","color":"d4c5f9"},{"url":"https://api.github.com/repos/deployd/deployd/labels/type:%20bug","name":"type: bug","color":"e10c02"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2015-10-17T19:44:00Z","updated_at":"2016-06-30T12:14:34Z","closed_at":"2016-06-30T12:14:34Z","body":"With dpd-fileupload, you can upload many files within the same request.\r\nWith node > 4.1 it leads to the error `E11000: duplicate key error`\r\nThe problem is located in this function:\r\nhttps://github.com/deployd/deployd/blob/master/lib/db.js#L288\r\nThe variable object on line 293 is not the right one, it's using the latest given in this function due to the different scope.\r\nTo fix it, we need to pass the right object all the way to the `insert`."}}
{"actor":{"display_login":"andreialecu"}}