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

Do not uncache spatial on reference change #504

Merged
merged 1 commit into from
Jan 30, 2022

Conversation

oscarlorentzon
Copy link
Member

Motivation

Uncaching on reference change leads to a race condition if the browser has internally cached files that are to be fetched. If cells happen to be cached before the reference change is invoked, those cells will be disposed.

Contribution

  • Reset spatial object positions on reference change.
  • Do not uncache on reference change.
  • Avoid multiple calls to catch cells by publishing cell observable.

Test Plan

yarn test
yarn build

Uncaching on reference change leads to a race condition
if the browser has internally cached files that are to
be fetched. If cells happen to be cached before the
reference change is invoked, those cells will be disposed.

Reference change should only occur on cell change.
@oscarlorentzon oscarlorentzon added this to the v4.1.0 milestone Jan 30, 2022
@oscarlorentzon oscarlorentzon self-assigned this Jan 30, 2022
@oscarlorentzon oscarlorentzon merged commit f2f49ec into main Jan 30, 2022
@oscarlorentzon oscarlorentzon deleted the feature-race-condition branch January 30, 2022 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants