Skip to content

Commit

Permalink
chore: add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
gfyrag committed Oct 23, 2024
1 parent f3f198f commit 646d27f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/controller/ledger/log_process.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ func runTx[INPUT any](ctx context.Context, store Store, parameters Parameters[IN
}

// todo: handle too many clients error
// notes(gfyrag): how?
// By retrying? Is the server already overloaded? Add a limit on the retries number?
// Ask the client to retry later?
func forgeLog[INPUT any](ctx context.Context, store Store, parameters Parameters[INPUT], fn func(ctx context.Context, sqlTX TX, input INPUT) (*ledger.Log, error)) (*ledger.Log, error) {
if parameters.IdempotencyKey != "" {
log, err := store.ReadLogWithIdempotencyKey(ctx, parameters.IdempotencyKey)
Expand Down

0 comments on commit 646d27f

Please sign in to comment.