Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Boost client report the deal state incorrectly #696

Closed
LexLuthr opened this issue Aug 12, 2022 · 0 comments · Fixed by #704
Closed

Boost client report the deal state incorrectly #696

LexLuthr opened this issue Aug 12, 2022 · 0 comments · Fixed by #704

Comments

@LexLuthr
Copy link
Collaborator

Deal state for "IndexedAndAnnounced" seems to be "Sealing" on the client side.

func statusMessage(resp *types.DealStatusResponse) string {
switch resp.DealStatus.Status {
case dealcheckpoints.Accepted.String():
if resp.IsOffline {
return "Awaiting Offline Data Import"
}
switch resp.NBytesReceived {
case 0:
return "Transfer Queued"
case 100:
return "Transfer Complete"
default:
pct := (100 * float64(resp.NBytesReceived)) / float64(resp.TransferSize)
return fmt.Sprintf("Transferring %.2f%%", pct)
}
case dealcheckpoints.Transferred.String():
return "Ready to Publish"
case dealcheckpoints.Published.String():
return "Awaiting Publish Confirmation"
case dealcheckpoints.PublishConfirmed.String():
return "Adding to Sector"
case dealcheckpoints.AddedPiece.String():
return "Announcing"
case dealcheckpoints.IndexedAndAnnounced.String():
return "Sealing"
case dealcheckpoints.Complete.String():
if resp.DealStatus.Error != "" {
return "Error: " + resp.DealStatus.Error
}
return "Complete"
}
return resp.DealStatus.Status
}

But as per the deal execution last checkpoint for a successful deal seems to be "IndexedAndAnnounced".

// Index deal in DAGStore and Announce deal
if deal.Checkpoint < dealcheckpoints.IndexedAndAnnounced {
if err := p.indexAndAnnounce(ctx, pub, deal); err != nil {
// any error here is always a recoverable error as this step is completely idempotent
return &dealMakingError{
recoverable: true,
err: fmt.Errorf("failed to add deal to dagstore/piecestore with recoverable error: %w", err),
uiMsg: "deal was paused while indexing because Boost was shut down",
}
}
p.dealLogger.Infow(deal.DealUuid, "deal successfully indexed and announced")
} else {
p.dealLogger.Infow(deal.DealUuid, "deal has already been indexed and announced")
}

I think we need to update the status on client side.

@jacobheun jacobheun added this to Boost Aug 12, 2022
@LexLuthr LexLuthr linked a pull request Aug 12, 2022 that will close this issue
@dirkmc dirkmc moved this to Done in Boost Aug 16, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
Status: Done
1 participant