Document importing should a minimal amount of work if the document already exists
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 38/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- rust
- Ambito
- distributed-systems
Direzione di ricerca
Inizia confrontando il comportamento di iroh.docs.open e iroh.docs.import, usando come contesto lo scenario di importazioni ripetute e iroh issue 1947. Verifica come vengono gestiti i documenti esistenti e gli indirizzi dei nodi dei ticket. Il lavoro è completato quando le importazioni ripetute restituiscono il controllo prontamente come open, continuando comunque a integrare in background i nuovi indirizzi dei nodi.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
This is sort-of the document equivalent of https://github.com/n0-computer/iroh/issues/1947. If RPC calls to import the same document are made in quick succession (as happens with https://github.com/expenses/usd-iroh-resolver), the RPC calls will eventually stall out (unless a timeout is used) and the iroh node will produce a bunch of sync and gossip warnings:
2024-02-02T03:44:28.897392Z WARN gossip{me=5edsipymvbm2kl2y}: iroh_gossip::net: dial failed: failed connecting to provider peer=PublicKey(7siesmyj2xdrlsti)
2024-02-02T03:44:28.897519Z WARN sync{me=5edsipymvbm2kl2y}: iroh::sync_engine::live: sync failed origin=Connect(DirectJoin) err=Failed to establish connection
Caused by:
0: failed connecting to provider
1: timed out
I managed to work around whatever issue is happening with iroh by checking if the document to import exists locally first:
if let Some(doc) = iroh.docs.open(ticket.capability.id()).await? {
return Ok(doc);
}
iroh.docs.import(ticket.clone()).await
This will not produce the expected behaviour if the ticket contains the addresses of nodes that aren't currently being synced with, as these will not be sent to the iroh node.
Ideally iroh.docs.import should perform the same actions as iroh.docs.open if the document already exists and there are no new node addresses, and if there are new nodes, should join these in the background while returning the document the same was as iroh.docs.open.
- 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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di n0-computer/iroh-docs
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
n0-computer/iroh-docs#124 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
n0-computer/iroh-docs#122 ·
-
Sync with a peer stays wedged after one AlreadySyncing refusal (local state never leaves Running)Aperta
Difficoltà 3/5 Mezza giornata Idoneità per principianti 62/100
n0-computer/iroh-docs#121 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
n0-computer/iroh-docs#120 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
n0-computer/iroh-docs#109 ·
Tutte le issue di n0-computer/iroh-docs
Issue simili
-
area:web kind:bug priority:p2 ready
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
sims1253/ry#931 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
sims1253/r-typeshed#140 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
storytold/craft-libs#2867 ·
I maintainer di solito rispondono entro 1 giorno
-
help wanted needs investigation priority: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100