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

support for maintaining topic->storage pipe after upgrade #6893

Open
turadg opened this issue Jan 30, 2023 · 0 comments
Open

support for maintaining topic->storage pipe after upgrade #6893

turadg opened this issue Jan 30, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request vaults_triage DO NOT USE

Comments

@turadg
Copy link
Member

turadg commented Jan 30, 2023

What is the Problem Being Solved?

Some durable objects links their topic/subscribers to storage. E.g. using forEachPublicationRecord

The watcher currently dies in upgrade and nothing resumes it.

Description of the Design

Use watchPromise.

Function signature approx,

  /**
   *
   * @template {object} T
   * @template {any[]} A args
   * @param {Promise<T>} p
   * @param {{onFulfilled: (T, ...A) => void, onRejected: (reason: any, ...A) => void}} watcher durable object handling resolution of the promise
   * @param {A} args added to calls to the watcher's handlers
   */
  function watchPromise(p, watcher, ...args) {

Assigning to @michaelfig because it fits into his overall Notifier revamp

Security Considerations

Scaling Considerations

Test Plan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request vaults_triage DO NOT USE
Projects
None yet
Development

No branches or pull requests

3 participants