n0-computer / n0-computer/iroh-docs

non symmetric sync

Open
#56 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
74
Forks
16
PR merge metrics
No merged PRs in 30d

Description

These are the full logs of a test failure for test_download_policies. This is not a frequent failure at all so having the logs is a great opportunity to understand what's going on with this sync/docs problem.

The test setup is as follows:

There are two nodes: nkpqjtgrfsdzojzk (NK) and wp3g26raw2ercopv (WP),
NK has 6 locally inserted entries.
WP has 3 locally inserted entries.
Both nodes are supposed to sync all entries from the other node, of course.
NK should download 1 of the entries WP has.
WP should download 3 of the entries NK has.
At the end of the test we assert that these exact numbers are upheld (sync and download ones).
What actually happens:

Nodes connect to each other.
They both emit the start sync log/event
WP emits the RemoteInsert events it should
WP downloads the entries it should
Silence from NK, no RemoteInsert at all, and of course no downloads either.
Notable logs:

DEBUG sync{me=nkpqjtgrfsdzojzk}: iroh::docs_engine::live: start sync namespace=NamespaceId(6gebwlyf7po3fygx) peers=0
DEBUG sync{me=wp3g26raw2ercopv}: iroh::docs_engine::live: start sync namespace=NamespaceId(6gebwlyf7po3fygx) peers=1
NK claims to be starting sync with 0 peers. This is weird and potentially a problem on itself. However the fact that WP is actively communicating and successfully syncing with NK tells me there is a connection and sync messages are being passed. Still, NK is not using that info on its side, which leads me to conclude sync is not happening symmetrically

Copied from https://github.com/n0-computer/iroh/issues/2319

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the test_download_policies test and reviewing its sync and download assertions alongside the captured logs. Compare the sync startup and RemoteInsert behavior for NK and WP, especially the reported peer counts. Done means the asymmetric behavior is understood and the test consistently observes the expected 1 and 3 downloads.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.