Skip to content

Commit 5171e6d

Browse files
authored
fix: FixRawSize CanAccept SQL array cast typo (#1035)
$1::[]bigint is Go slice syntax, not PostgreSQL. Should be $1::bigint[]. Causes 'syntax error at or near "["' on every poll cycle, preventing all FixRawSize tasks from being accepted. Introduced in #855 (improve canAccept() performance) — every other CanAccept rewrite in that PR uses the correct ::bigint[] form; this one file was missed.
1 parent 4918b43 commit 5171e6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tasks/storage-market/task_fix_rawSize.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ func (f *FixRawSize) CanAccept(ids []harmonytask.TaskID, engine *harmonytask.Tas
131131
INNER JOIN market_piece_deal mpd ON f.id = mpd.id
132132
INNER JOIN sector_location l ON mpd.sp_id = mpd.miner_id AND mpd.sector_number = l.sector_num AND l.sector_filetype = 4
133133
INNER JOIN storage_path sp ON sp.storage_id = l.storage_id
134-
WHERE f.task_id = ANY($1::[]bigint) AND sp.urls IS NOT NULL AND sp.urls LIKE '%' || $2 || '%' LIMIT 100) s`, indIDs, engine.Host()).Scan(&acceptedIDs)
134+
WHERE f.task_id = ANY($1::bigint[]) AND sp.urls IS NOT NULL AND sp.urls LIKE '%' || $2 || '%' LIMIT 100) s`, indIDs, engine.Host()).Scan(&acceptedIDs)
135135
if err != nil {
136136
return nil, xerrors.Errorf("getting tasks from DB: %w", err)
137137
}

0 commit comments

Comments
 (0)