Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport #7020 for LTS #7085

Merged
merged 1 commit into from
Mar 9, 2020
Merged

Conversation

HeroicEric
Copy link
Member

Backports Ensure adapters and serializers are destroyed upon store destruction. #7020 for LTS 3.12

This required a few changes:

@HeroicEric HeroicEric requested a review from igorT March 6, 2020 11:28
willDestroy() {
this._super(...arguments);
this._pushedInternalModels = null;
this.recordArrayManager.destroy();

this._adapterCache = null;
this._serializerCache = null;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@igorT these lines had already been removed by the time the original changes were made in #7020 I had to also remove them to backport this change in order for the destroy() logic above to work. I'm not totally sure what, if any, implications this might have elsewhere. I found a comment related to this https://github.com/emberjs/data/pull/6207/files#r306956786 so I was thinking you might have more context

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍on this PR, but I will double check with @runspired and @rwjblue whether this is still correct thinking

@HeroicEric HeroicEric added the backport-lts PR targets the current lts branch label Mar 6, 2020
…emberjs#7020)

Prior to this change, adapters and serializers were never destroyed.
Commonly (and anecdotally) this is "fine" (heck this is the first report
of the issue in years!), but it is pretty common for adapters to do
async of their own (e.g. tracking adapter responses, exponential
backoffs, etc) and without `.destroy()` being called on them there is no
way for those adapters/serializer to ensure that async is canceled
appropriately.
@igorT igorT force-pushed the lts-3-12-backport-7020 branch from d7cab00 to d5b6ab3 Compare March 9, 2020 17:03
@igorT igorT merged commit 26079b4 into emberjs:lts-3-12 Mar 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-lts PR targets the current lts branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants