You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The parallel router aborts as soon as any of the routers have completed their search. This is problematic if we first we publish and then search because publishing will store a copy of the record in our datastore during the put
If the LAN DHT is much smaller than the WAN DHT (e.g. the normal online case) or the WAN DHT is much smaller than the LAN DHT (e.g. an offline case or one using a segregated network like CJDNS) then one of the DHTs will return immediately with a single record (the one previously published) and therefore cause an abort of the other DHT query.
@wenyue Thanks for pointing this out. If you would like to address this issue, please consider submitting a pull request. Your contribution would be greatly appreciated!
The dual DHT uses the parallel router SearchValue:
go-libp2p-kad-dht/dual/dual.go
Lines 345 to 348 in 57a258f
The parallel router aborts as soon as any of the routers have completed their search. This is problematic if we first we publish and then search because publishing will store a copy of the record in our datastore during the put
go-libp2p-kad-dht/routing.go
Line 62 in 57a258f
and then when we do a search we will get that record:
go-libp2p-kad-dht/routing.go
Line 298 in 57a258f
If the LAN DHT is much smaller than the WAN DHT (e.g. the normal online case) or the WAN DHT is much smaller than the LAN DHT (e.g. an offline case or one using a segregated network like CJDNS) then one of the DHTs will return immediately with a single record (the one previously published) and therefore cause an abort of the other DHT query.
@petar @Stebalien
The text was updated successfully, but these errors were encountered: