{"record":{"id":"06dd43d2ea551efa","repo":"gastownhall/beads","slug":"blocker-edge-rows-from-s-w","errorCode":null,"errorMessage":"blocker edge rows from %s: %w","messagePattern":"blocker edge rows from (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/storage/issueops/dependency_queries.go","lineNumber":954,"sourceCode":"\t\t\tWHERE issue_id = ? AND type IN ('blocks', 'waits-for', 'conditional-blocks')\n\t\t`, DepTargetExpr, depTable), issueID)\n\t\tif err != nil {\n\t\t\tif optionalBlockedTable(depTable) && isTableNotExistError(err) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\treturn false, nil, fmt.Errorf(\"check blockers from %s: %w\", depTable, err)\n\t\t}\n\t\tfor rows.Next() {\n\t\t\tvar e depEdge\n\t\t\tif err := rows.Scan(&e.dependsOnID, &e.depType); err != nil {\n\t\t\t\t_ = rows.Close()\n\t\t\t\treturn false, nil, fmt.Errorf(\"scan blocker edge: %w\", err)\n\t\t\t}\n\t\t\tedges = append(edges, e)\n\t\t}\n\t\t_ = rows.Close()\n\t\tif err := rows.Err(); err != nil {\n\t\t\treturn false, nil, fmt.Errorf(\"blocker edge rows from %s: %w\", depTable, err)\n\t\t}\n\t}\n\n\tif len(edges) == 0 {\n\t\treturn true, nil, nil\n\t}\n\n\tblockerIDs := make([]string, 0, len(edges))\n\tfor _, e := range edges {\n\t\tblockerIDs = append(blockerIDs, e.dependsOnID)\n\t}\n\tstatusByID, err := loadStatusByIDInTx(ctx, tx, blockerIDs)\n\tif err != nil {\n\t\treturn false, nil, fmt.Errorf(\"check blocker status: %w\", err)\n\t}\n\tvar blockers []string\n\tfor _, e := range edges {\n\t\tstatus, ok := statusByID[e.dependsOnID]","sourceCodeStart":936,"sourceCodeEnd":972,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/internal/storage/issueops/dependency_queries.go#L936-L972","documentation":"Wraps an error from rows.Err() after streaming blocker edge rows in IsBlockedInTx. Errors that occur mid-iteration (connection drop, I/O failure, cancellation) surface here after the loop, aborting the blocked check so no partial edge set is used.","triggerScenarios":"The driver encounters a streaming error while iterating edge rows from a dependency table during IsBlockedInTx, detected via rows.Err() after the Next() loop.","commonSituations":"Context cancellation/timeout mid-query; connection reset to a remote SQL server; embedded storage I/O errors (disk full, file lock).","solutions":["Inspect the wrapped error for cancellation vs I/O cause","Increase timeouts or avoid cancelling the context mid-transaction","Restore connectivity to the SQL server and retry","Check disk space / file locks for embedded backends"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err := issueops.IsBlocked(ctx, id); err != nil {\n\tif errors.Is(err, context.Canceled) || errors.Is(err, io.ErrUnexpectedEOF) {\n\t\t// transient: retry with fresh context\n\t}\n\treturn err\n}","preventionTips":["Set adequate context timeouts for blocked checks","Avoid cancelling operations mid-transaction","Ensure sufficient disk space for embedded backends"],"tags":["go","sql","row-iteration","storage"],"backgroundTag":"row-iteration-error","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}