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

Sync/ Device discovery inconsistent #872

Open
ximenabb opened this issue Sep 30, 2024 · 2 comments
Open

Sync/ Device discovery inconsistent #872

ximenabb opened this issue Sep 30, 2024 · 2 comments
Labels
bug Something isn't working sync

Comments

@ximenabb
Copy link

ximenabb commented Sep 30, 2024

Details : https://www.notion.so/digidem/Sync-Device-discovery-inconsistent-10c1b08162d580099a26fdeb94138c5c

@ximenabb ximenabb added the bug Something isn't working label Sep 30, 2024
@ximenabb ximenabb added the sync label Sep 30, 2024
EvanHahn added a commit that referenced this issue Nov 18, 2024
In [#872], we observed a bug where we seemingly had the wrong number of
remote sync states. This adds a test assertion that we have the right
number.

[#872]: #872
@EvanHahn
Copy link
Contributor

I can't reproduce this issue on the backend. I wrote this test to simulate the bug we were seeing:

test('issue 872', async (t) => {
  const managerCount = 4

  const managers = await createManagers(managerCount, t)
  const [invitor, ...invitees] = managers

  const disconnectPeers = connectPeers(managers)
  t.after(disconnectPeers)

  const projectId = await invitor.createProject({ name: 'Mapeo' })
  await invite({ invitor, invitees, projectId })

  const projects = await Promise.all(
    managers.map((m) => m.getProject(projectId))
  )
  await waitForSync(projects, 'initial')

  for (const project of projects) {
    const { remoteDeviceSyncState } = project.$sync.getState()
    const otherDevices = Object.keys(remoteDeviceSyncState).length
    assert.equal(otherDevices, managerCount - 1)
  }
})

I don't think this test is worth including because it's so specific, but I tweaked an existing test in #964.

Either this is no longer a bug, it's a frontend-only bug, or the bug exists elsewhere.

EvanHahn added a commit that referenced this issue Nov 18, 2024
In [#872], we observed a bug where we seemingly had the wrong number of
remote sync states. This adds a test assertion that we have the right
number.

[#872]: #872
@EvanHahn EvanHahn removed their assignment Dec 11, 2024
@EvanHahn
Copy link
Contributor

Andrew was still able to reproduce this. I was hopeful that we'd fixed it, but alas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sync
Projects
None yet
Development

No branches or pull requests

2 participants