Sync with other peers never re-downloads blobs

Aperta
#82 2 commenti 3 reazioni 0 assegnatari Vedi su GitHub

@cbenhagen ci sta già lavorando.

Dal 31/3/2026.

  • #88 di @cbenhagen — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
38/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
rust

Direzione di ricerca

Inizia tracciando il percorso di sincronizzazione di Docs, la gestione di Download policy, il tracciamento di missing_hashes e gli eventi ContentReady descritti nell’issue. Confronta il comportamento con l’approccio collegato di iroh-lan in router.rs; il lavoro è completato quando un peer può risincronizzarsi con un altro peer e ottenere blob che un peer precedente non aveva, senza intervento locale.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Current system allows to set a Download policy so you automatically download values (blobs) from peers that inserted an entry.

When everyone is connected, and you are fully synced, it works without any problem and it automatically downloads from peers. It also maintains a list of missing_hashes in case who inserted doesn't have the hash yet, and later downloads from them when it receives a ContentReady event.

The problem arrises when you first sync with a peer that doesn't have all blobs downloaded. This might happen because it didn't download yet or because their Download Policy doesn't allow them to download it.

After that, the system will never try to download from any other peer that information unless you do so locally. Even if you sync with other peers, you only exchange information about the keys, so in case your keys are synced, you don't try to download the values.

For me, this seems like a non intended behavior because the download policy of one peer shouldn't affect other peers that are actively downloading all values.

Other projects like iroh-lan, do the re-syncing themselves by querying the whole key-value store and looking for missing hashes in blobs then retrying download them from other peers.

This could be done more efficiently inside Docs and also emitting events about ContentReady again so when someone does the syncing, others could piggyback and request any missing_hashes on their side directly, reusing docs machinery.

Lingua principale
Rust
Stelle
81
Fork
19
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di n0-computer/iroh-docs

Tutte le issue di n0-computer/iroh-docs

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.