Skip to content

Commit

Permalink
fix sector status output (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
LexLuthr authored Jul 15, 2024
1 parent aab4e18 commit 55ddede
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions market/fakelm/lmimpl.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,19 @@ func (l *LMRPCProvider) SectorsStatus(ctx context.Context, sid abi.SectorNumber,
err := l.db.Select(ctx, &ssip, `
WITH CheckCommit AS (
SELECT
sp_id,
sector_number,
after_commit_msg,
failed,
after_sdr,
after_porep,
after_tree_r,
after_commit_msg_success
COALESCE(sp.sp_id, sm.sp_id) AS sp_id,
COALESCE(sp.sector_number, sm.sector_num) AS sector_number,
COALESCE(sp.after_commit_msg, TRUE) AS after_commit_msg,
COALESCE(sp.failed, FALSE) AS failed,
COALESCE(sp.after_sdr, TRUE) AS after_sdr,
COALESCE(sp.after_porep, TRUE) AS after_porep,
COALESCE(sp.after_tree_r, TRUE) AS after_tree_r,
COALESCE(sp.after_commit_msg_success, TRUE) AS after_commit_msg_success
FROM
sectors_sdr_pipeline
sectors_sdr_pipeline sp
FULL OUTER JOIN sectors_meta sm ON sp.sp_id = sm.sp_id AND sp.sector_number = sm.sector_num
WHERE
sp_id = $1 AND sector_number = $2
(sp.sp_id = $1 AND sp.sector_number = $2) OR (sm.sp_id = $1 AND sm.sector_num = $2)
),
MetaPieces AS (
SELECT
Expand Down

0 comments on commit 55ddede

Please sign in to comment.