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

fix: respect all data namespaces for sync auto-stop #769

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

EvanHahn
Copy link
Contributor

We reset the auto-stop timer if we receive any new data since our last sync update. However, we were only respecting the data namespace and forgot about the blob namespace.

This fixes that.

Closes #768.

Comment on lines +16 to +19
/** @type {ReadonlyArray<Namespace>} */
export const DATA_NAMESPACES = NAMESPACES.filter(
(namespace) => !PRESYNC_NAMESPACES.includes(namespace)
)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was removed recently in 2b36edd, and I'm adding it back same as it was.

We reset the auto-stop timer if we receive any new data since our last
sync update. However, we were only respecting the `data` namespace and
forgot about the `blob` namespace.

This fixes that.

Closes [#768].

[#768]: #768
@EvanHahn EvanHahn force-pushed the restart-autostop-timeout-for-blobs branch from c71891f to 6b25f57 Compare August 28, 2024 18:18
@@ -333,13 +346,25 @@ test('auto-stop', async (t) => {

await clock.tickAsync(9000)

const observation2 = await invitorProject.observation.create(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pseudocode for this diff:

-createObservation()
+createBlob()

 checkThatAutostopTimeoutIsUpdated()

@EvanHahn EvanHahn merged commit b017e61 into main Aug 29, 2024
7 checks passed
@EvanHahn EvanHahn deleted the restart-autostop-timeout-for-blobs branch August 29, 2024 12:30
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.

Sync shouldn't auto-stop while blobs are syncing
2 participants