Skip to content

Commit

Permalink
Merge pull request #324 from filecoin-project/fix/deal-stuck
Browse files Browse the repository at this point in the history
opt: not wait for index results to be generated
  • Loading branch information
hunjixin authored May 5, 2023
2 parents 91e9c12 + e785534 commit 5ea1678
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions storageprovider/deal_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -529,13 +529,11 @@ func (storageDealPorcess *StorageDealProcessImpl) HandleOff(ctx context.Context,
}
}

log.Infof("register shard. deal:%d, proposalCid:%s, pieceCid:%s", deal.DealID, deal.ProposalCid, deal.Proposal.PieceCID)
// Register the deal data as a "shard" with the DAG store. Later it can be
// fetched from the DAG store during retrieval.
if err := stores.RegisterShardSync(ctx, storageDealPorcess.dagStore, deal.Proposal.PieceCID, carFilePath, true); err != nil {
err = fmt.Errorf("failed to activate shard: %w", err)
log.Error(err)
} else {
log.Infof("register shard successfully. deal:%d, proposalCid:%s, pieceCid:%s", deal.DealID, deal.ProposalCid, deal.Proposal.PieceCID)
if err := storageDealPorcess.dagStore.RegisterShard(ctx, deal.Proposal.PieceCID, carFilePath, true, nil); err != nil {
log.Errorf("failed to register shard: %v", err)
}

log.Infow("successfully handed off deal to sealing subsystem", "pieceCid", deal.Proposal.PieceCID, "proposalCid", deal.ProposalCid)
Expand Down

0 comments on commit 5ea1678

Please sign in to comment.