bug: GlobalReader.ReadFrom panics with fromSequence > MaxInt64 — both pgstore and sqlitestore #153
Labels
No labels
bug
documentation
enhancement
investigation
nice-to-have
performance
production-ready
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ash/eskit#153
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
Found by red team testing.
ReadFrom(ctx, math.MaxUint64, limit)panics with pgx encoding error.The API accepts
uint64forfromSequencebut Postgres BIGSERIAL isint64(max 9.2×10¹⁸). AnyfromSequence > MaxInt64causes a panic.Fix
Add bounds check at the top of ReadFrom in both pgstore and sqlitestore:
Also add to LatestSequence return type documentation that the practical max is MaxInt64.
Priority
Medium — unlikely in practice (9.2 quintillion events) but the API should not panic on valid uint64 input.
bug: GlobalReader.ReadFrom panics with fromSequence > MaxInt64to bug: GlobalReader.ReadFrom panics with fromSequence > MaxInt64 — both pgstore and sqlitestore