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: NamespaceSyncState improvements #339

Merged
merged 4 commits into from
Oct 16, 2023

Conversation

gmaclennan
Copy link
Member

  1. Cache sync state
  2. Sum peer sync states in NamespaceSyncState

Had originally omitted the sums of peer sync states for cores in a namespace because we don't need it for the UI, but it turns out we need it for the internal sync control because we need the state of each peer before we allow moving to the next stage of sync.

@gmaclennan gmaclennan self-assigned this Oct 16, 2023
@gmaclennan gmaclennan requested a review from achou11 October 16, 2023 13:59
Copy link
Member

@achou11 achou11 left a comment

Choose a reason for hiding this comment

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

one comment about the caching that may require changes

src/sync/namespace-sync-state.js Outdated Show resolved Hide resolved
@gmaclennan gmaclennan requested a review from achou11 October 16, 2023 15:28
@achou11
Copy link
Member

achou11 commented Oct 16, 2023

looks like tests are failing for something legitimate

@gmaclennan
Copy link
Member Author

looks like tests are failing for something legitimate

oops sorry I should have run the whole test suite. My change to a test helper function was breaking a test elsewhere in the code.

@gmaclennan gmaclennan merged commit 110d6d8 into main Oct 16, 2023
4 of 7 checks passed
@gmaclennan gmaclennan deleted the feat/namespace-sync-improvements branch October 16, 2023 17:30
gmaclennan added a commit that referenced this pull request Oct 20, 2023
* main:
  feat: NamespaceSyncState improvements (#339)
  chore: update better-sqlite3 to 8.7.0 (#337)
  chore: update @mapeo/crypto to latest (#336)
  fix: write own device info when creating and adding projects (#297)
  Feat: add DataStore.writeRaw method (#334)
  feat: Add NamespaceSyncState (#313)
  chore: run CI on PRs against any branch (#330)
  feat: add capabilities.getAll() (#326)
gmaclennan added a commit that referenced this pull request Oct 22, 2023
* main:
  fix: pin pre-releases to exact version (#344)
  fix: fix 'write EPIPE' error & failing discovery test (#328)
  feat: NamespaceSyncState improvements (#339)
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.

2 participants