-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[vsm] 在对订单进行 release-deals 时,并未修改 state 字段。导致订单不能被释放出来 #602
Milestone
Comments
0x5459
changed the title
[vsm] 在对订单进行release-deals时,并未修改state字段。导致订单不能被释放出来
[vsm] 在对订单进行 release-deals 时,并未修改 state 字段。导致订单不能被释放出来
Feb 14, 2023
diwufeiwen
added
P2
Medium - we should get to this soon
vsmgr
vsmgr related issue
labels
Feb 14, 2023
venus: UpdateDealStatus(ctx context.Context, miner address.Address, dealID abi.DealID, pieceStatus market.PieceStatus) error
->
UpdateDealStatus(ctx context.Context, miner address.Address, dealID abi.DealID, pieceStatus market.PieceStatus, state storagemarket.StorageDealStatus) error |
venus-cluster: err = api.Market.UpdateDealStatus(gctx, maddr, abi.DealID(dealID), market.DealStatusUndefine, storagemarket.StorageDealAwaitingPreCommit) |
venus-market: func (ps *dealAssigner) UpdateDealStatus(ctx context.Context, miner address.Address, dealID abi.DealID, pieceStatus types.PieceStatus, state storagemarket.StorageDealStatus) error {
md, err := ps.repo.StorageDealRepo().GetDealByDealID(ctx, miner, dealID)
if err != nil {
log.Error("get deal [%d] error for %s", dealID, miner)
return fmt.Errorf("failed to get deal %d for miner %s: %w", dealID, miner.String(), err)
}
md.PieceStatus = pieceStatus
md.State = state
if err := ps.repo.StorageDealRepo().SaveDeal(ctx, md); err != nil {
return fmt.Errorf("failed to update deal %d piece status for miner %s: %w", dealID, miner.String(), err)
}
return nil
} |
建议放在nv18版本中 |
This was referenced Feb 27, 2023
11 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
模块 / Components
版本 / Version
描述 / Describe the Bug
venus-makret 的订单释放由两个字段控制,分别是 storage_deals 表中的 state 和 piece_status。而使用 release-deals 时,只会把 piece_status 的状态改为 Undefine,对于 PreCommitSector 消息没有上链的订单,是可以正常释放出来。当 PreCommitSector 消息上链之后,state 字段就会由 29 变成 5,而 release-deals 功能并不会把对应的值也修改过来(命令无法释放出订单)。
日志 / Logging Information
重现步骤 / Repo Steps
No response
The text was updated successfully, but these errors were encountered: