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

feat: meteor 2.16 #26

Merged
merged 1 commit into from
Oct 31, 2024
Merged

feat: meteor 2.16 #26

merged 1 commit into from
Oct 31, 2024

Conversation

Julusian
Copy link
Collaborator

@Julusian Julusian commented Oct 28, 2024

Update meteor to 2.16, and do some preparation groundwork for 3.0

  • move from observe to observeAsync and observeChanges to observeChangesAsync
  • replace a few more waitForPromise calls

Notes

This also fixes some concerns I have with some of the *Observer classes. I have concerns about leaks if they are in the middle of executing while stop() is called, to mitigate this I have given each of them a #disposed property which allows various callbacks to know they have been disposed and make sure they don't semi-restart themselves after stop() is called.
The most visible scenario of this is StudioObserver, where if stop was called while its RundownsObserver was being reconstructed, then that RundownsObserver would be leaked.

There was also an issue with some of the debounces, where there could be concurrent executions of them in different fibers if the execution took longer than the debounce time. A new helper has been written and used to mitigate this PromiseDebounce.

I suspect there were also other places of potential leaks, when multiple mongo observers were setup and if one of them threw and error the ones which succeeded would be leaked. The waitForAllObserversReady handler has been added to handle this safely.

TODO:

  • Write unit tests for PromiseDebounce, or consider if there is an existing alternative that would work

@Julusian Julusian mentioned this pull request Oct 28, 2024
@Julusian Julusian marked this pull request as ready for review October 29, 2024 17:26
@Julusian Julusian merged commit e885d66 into bbc-release52 Oct 31, 2024
86 checks passed
@Julusian Julusian deleted the feat/meteor-2.16 branch October 31, 2024 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant