What changed, and why it matters
This commit removes an unused helper function that generated random retry delays. It is a code cleanup change with no security relevance: the deleted code was not being called anywhere and did not affect program behavior.
No action required. This is a benign cleanup commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch deletes randRetryDelay() from sqldb/v2/interfaces.go. This method was part of txExecutorOptions but was dead code; the package’s live retry path uses exponential backoff instead. Removing it eliminates a redundant retry API and reduces maintenance surface. There is no functional or security change.
Changed components
sqldb/v2/interfaces.goInspect captured patch +0 / −6
diff --git a/sqldb/v2/interfaces.go b/sqldb/v2/interfaces.go
index adce4e5..a204de5 100644
--- a/sqldb/v2/interfaces.go
+++ b/sqldb/v2/interfaces.go
@@ -153,12 +153,6 @@ func defaultTxExecutorOptions() *txExecutorOptions {
}
}
-// randRetryDelay returns a random retry delay between 0 and the configured max
-// delay.
-func (t *txExecutorOptions) randRetryDelay() time.Duration {
- return time.Duration(rand.Int63n(int64(t.maxRetryDelay))) //nolint:gosec
-}
-
// TxExecutorOption is a functional option that allows us to pass in optional
// argument when creating the executor.
type TxExecutorOption func(*txExecutorOptions)
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.