Part of #297
Description
When an ipfsRootCid maps to multiple Filecoin pieces (shards), as is the case for Storacha content, the query WHERE pieces.ipfs_root_cid = ? returns one row per shard. If all shards live on the same SP (the common case), selectRetrievalCandidate receives N identical candidates and retries the same SP N times on failure. This gives a false impression of redundancy and wastes the retry budget without increasing resilience.
Proposed solution
Avaliate SQL vs JS filter
Done criteria
Notes
- The sequential CAR block ordering assumption in
retrieval.js is a separate deferred follow-up
Part of #297
Description
When an
ipfsRootCidmaps to multiple Filecoin pieces (shards), as is the case for Storacha content, the queryWHERE pieces.ipfs_root_cid = ?returns one row per shard. If all shards live on the same SP (the common case),selectRetrievalCandidatereceives N identical candidates and retries the same SP N times on failure. This gives a false impression of redundancy and wastes the retry budget without increasing resilience.Proposed solution
Avaliate SQL vs JS filter
Done criteria
validateQueryResultsAndGetCandidatesdeduplicates candidates byserviceProviderIdafter the auth cascadestore.test.jstests pass unchangedNotes
retrieval.jsis a separate deferred follow-up