ipni / storetheindex

A directory of CIDs
Other
75 stars 21 forks source link

Pointer to head advertisement is updated before processing of entries finish #174

Closed masih closed 2 years ago

masih commented 2 years ago

Pointer to head ad is updated before processing of entries finishes (this is entries of the head ad or its previous ads).

As a result if syncing of entries fail, say due to intermittent connection issue, or indexer restart, those entries will never be synced again.

Manual sync will also not work because of the reference to latest matching the current head.

Note that not updating the head is not enough to make sure a chain of entries is fully synced. because right now we only check the local datastore for root entries chain before syncing over graphsync. So if a chain of entries is partially synced, as long as its root is synced the logic thinks that the entire chain is present.

gammazero commented 2 years ago

Fixed by #180 and #190