Skip to content

Comments

fix: FixRawSize CanAccept SQL array cast typo#1034

Closed
Reiers wants to merge 1 commit intofilecoin-project:mainfrom
Reiers:fix/rawsize-sql-typo
Closed

fix: FixRawSize CanAccept SQL array cast typo#1034
Reiers wants to merge 1 commit intofilecoin-project:mainfrom
Reiers:fix/rawsize-sql-typo

Conversation

@Reiers
Copy link
Contributor

@Reiers Reiers commented Feb 19, 2026

Summary

Fix PostgreSQL syntax error in FixRawSize.CanAccept() that breaks all FixRawSize task acceptance on v1.27.3-rc1.

Problem

tasks/storage-market/task_fix_rawSize.go:134 has:

WHERE f.task_id = ANY($1::[]bigint)

::[]bigint is Go slice syntax, not valid PostgreSQL. The [ after :: triggers:

ERROR: syntax error at or near "[" (SQLSTATE 42601)

This fires on every 3s poll cycle, rejecting all FixRawSize tasks. The scheduler (IAmBored, 60s interval) keeps creating entries up to its cap of 100, none of which can ever be accepted.

Fix

- WHERE f.task_id = ANY($1::[]bigint)
+ WHERE f.task_id = ANY($1::bigint[])

Every other CanAccept rewrite in the codebase already uses the correct ::bigint[] form.

Root Cause

Introduced in #855 (improve canAccept() performance) — all other files in that PR use the correct cast; this one was missed.

$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 filecoin-project#855 (improve canAccept() performance) — every other
CanAccept rewrite in that PR uses the correct ::bigint[] form; this
one file was missed.
@Reiers Reiers requested a review from a team as a code owner February 19, 2026 18:54
@Reiers
Copy link
Contributor Author

Reiers commented Feb 19, 2026

Reopening from upstream branch to trigger CI.

@Reiers Reiers closed this Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant