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(common,store-sync): improve initial sync to not block returned promise #1315

Merged
merged 14 commits into from
Aug 21, 2023

Conversation

holic
Copy link
Member

@holic holic commented Aug 16, 2023

fixes #1238

TODO:

  • figure out if we can and want to emit the initial snapshot as part of blockStorageOperations$, and if not, see if we can add back in the log expectation

@changeset-bot
Copy link

changeset-bot bot commented Aug 16, 2023

🦋 Changeset detected

Latest commit: 7d84754

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 27 packages
Name Type
@latticexyz/common Patch
@latticexyz/store-sync Patch
@latticexyz/block-logs-stream Patch
@latticexyz/cli Patch
@latticexyz/config Patch
@latticexyz/dev-tools Patch
@latticexyz/protocol-parser Patch
@latticexyz/std-client Patch
@latticexyz/store-cache Patch
@latticexyz/store-indexer Patch
@latticexyz/store Patch
@latticexyz/world Patch
@latticexyz/ecs-browser Patch
@latticexyz/react Patch
create-mud Patch
@latticexyz/gas-report Patch
@latticexyz/network Patch
@latticexyz/noise Patch
@latticexyz/phaserx Patch
@latticexyz/recs Patch
@latticexyz/schema-type Patch
@latticexyz/services Patch
@latticexyz/solecs Patch
solhint-config-mud Patch
solhint-plugin-mud Patch
@latticexyz/std-contracts Patch
@latticexyz/utils Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@holic holic changed the title WIP rework initial fetch from indexer to not block feat(common,store-sync): improve initial sync to not block returned promise Aug 17, 2023
@holic holic marked this pull request as ready for review August 17, 2023 17:07
@holic holic requested a review from alvrs as a code owner August 17, 2023 17:07
Copy link
Member

@alvrs alvrs left a comment

Choose a reason for hiding this comment

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

nice!

@@ -1,3 +1,3 @@
export function wait(ms: number): Promise<void> {
return new Promise((resolve) => setTimeout(resolve, ms));
return new Promise<void>((resolve) => setTimeout(() => resolve(), ms));
Copy link
Member

Choose a reason for hiding this comment

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

why this change?

Copy link
Member Author

Choose a reason for hiding this comment

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

not sure it's necessary, just slightly more explicit to avoid arguments passing through to resolve
(I had this in waitForIdle and felt more consistent to do it here too)

@holic holic merged commit bb6ada7 into main Aug 21, 2023
9 checks passed
@holic holic deleted the holic/sync-step-indexer-fetch-2 branch August 21, 2023 08:55
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.

syncToRecs should be not async
2 participants