{"action":"created","issue":{"url":"https://api.github.com/repos/emberjs/data/issues/4077","repository_url":"https://api.github.com/repos/emberjs/data","labels_url":"https://api.github.com/repos/emberjs/data/issues/4077/labels{/name}","comments_url":"https://api.github.com/repos/emberjs/data/issues/4077/comments","events_url":"https://api.github.com/repos/emberjs/data/issues/4077/events","html_url":"https://github.com/emberjs/data/pull/4077","id":126648223,"number":4077,"title":"[CLEANUP beta] Change the way metadata in response is stored on record array","user":{"login":"danmcclain","id":144138,"avatar_url":"https://avatars.githubusercontent.com/u/144138?v=3","gravatar_id":"","url":"https://api.github.com/users/danmcclain","html_url":"https://github.com/danmcclain","followers_url":"https://api.github.com/users/danmcclain/followers","following_url":"https://api.github.com/users/danmcclain/following{/other_user}","gists_url":"https://api.github.com/users/danmcclain/gists{/gist_id}","starred_url":"https://api.github.com/users/danmcclain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danmcclain/subscriptions","organizations_url":"https://api.github.com/users/danmcclain/orgs","repos_url":"https://api.github.com/users/danmcclain/repos","events_url":"https://api.github.com/users/danmcclain/events{/privacy}","received_events_url":"https://api.github.com/users/danmcclain/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-01-14T12:47:46Z","updated_at":"2016-03-24T10:16:22Z","closed_at":"2016-01-15T15:11:03Z","pull_request":{"url":"https://api.github.com/repos/emberjs/data/pulls/4077","html_url":"https://github.com/emberjs/data/pull/4077","diff_url":"https://github.com/emberjs/data/pull/4077.diff","patch_url":"https://github.com/emberjs/data/pull/4077.patch"},"body":"The previous implementation of inserting metadata from an ajax response\r\nonto a record array used the store as temporary storage for the metadata\r\nvia `store._metadataFor` and `store._setMetadataFor`. Although rare, this could\r\nstore the wrong value on the record array due to a race condition, as\r\nthe metadata was stored based on the query's model's name. This moves\r\nthe storing of metadata to `AdapterPopulatedRecordArray.loadRecords`\r\nsince, at the time that that method is called, the payload is present,\r\nso we don't have to use `store.{_setMetadataFor,_metadataFor}`.\r\n`store._metadataFor` was only used in\r\n`AdapterPopulatedRecordArray.loadRecords`, so it is no longer needed\r\nwith this new implementation."},"comment":{"url":"https://api.github.com/repos/emberjs/data/issues/comments/200773538","html_url":"https://github.com/emberjs/data/pull/4077#issuecomment-200773538","issue_url":"https://api.github.com/repos/emberjs/data/issues/4077","id":200773538,"user":{"login":"duizendnegen","id":665795,"avatar_url":"https://avatars.githubusercontent.com/u/665795?v=3","gravatar_id":"","url":"https://api.github.com/users/duizendnegen","html_url":"https://github.com/duizendnegen","followers_url":"https://api.github.com/users/duizendnegen/followers","following_url":"https://api.github.com/users/duizendnegen/following{/other_user}","gists_url":"https://api.github.com/users/duizendnegen/gists{/gist_id}","starred_url":"https://api.github.com/users/duizendnegen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duizendnegen/subscriptions","organizations_url":"https://api.github.com/users/duizendnegen/orgs","repos_url":"https://api.github.com/users/duizendnegen/repos","events_url":"https://api.github.com/users/duizendnegen/events{/privacy}","received_events_url":"https://api.github.com/users/duizendnegen/received_events","type":"User","site_admin":false},"created_at":"2016-03-24T10:16:22Z","updated_at":"2016-03-24T10:16:22Z","body":"Similar issue, the workaround in https://github.com/emberjs/data/issues/4115 now no longer works."}}