Commit de6b5a5
fix: use detached context for CreateMember rollback
When an HTTP client times out mid-request (e.g. the
v1-sync-helper's 30 s http.Client.Timeout under onboarding
load), the committee-service request context is cancelled.
The deferred rollback in CreateMember was calling
deleteMemberKeys with that cancelled context, causing every
NATS KV cleanup call to fail immediately. The uniqueness key
written by UniqueMember (step 7) was left orphaned, blocking
future create attempts for the same email+committee pair with
a spurious 409 Conflict.
Fix: use context.WithTimeout(context.Background(), 10s) for
the rollback, matching the pattern already used by UpdateMember
for its stale-key cleanup goroutine.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Issue: LFXV2-2984
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>1 parent 4747b11 commit de6b5a5
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
105 | 107 | | |
106 | 108 | | |
107 | 109 | | |
| |||
0 commit comments