Commit a6af333
committed
feat(redis): flip one-phase txn dedup default-off to default-on
Implements the proposal in
docs/design/2026_06_10_proposed_redis_onephase_dedup_default_on.md.
The Redis adapter's one-phase idempotency dedup
(adapter.RedisServer.onePhaseTxnDedup) now defaults on. The
ELASTICKV_REDIS_ONEPHASE_DEDUP env var inverts from opt-in (=1
enabled, anything else disabled) to opt-out (=0 disabled, anything
else enabled). The WithOnePhaseTxnDedup constructor option still
trumps the env var.
Authorization for the flip is the parent design's M4 7-day green
criterion in the dedup-mode Jepsen workflow
(.github/workflows/jepsen-test-scheduled-dedup.yml), met by 12
consecutive green runs over 10 days (2026-05-31 → 2026-06-10) on the
stress profile that produced the parent design's trigger anomaly. The
parent's R5 (FSM determinism across a rolling upgrade) is discharged
— the probe code has shipped on every production node for months, so
the writer (emission) flipping on is uniformly understood.
To preserve the legacy-path coverage during the post-flip observation
window, the control workflow
(.github/workflows/jepsen-test-scheduled.yml) now sets
ELASTICKV_REDIS_ONEPHASE_DEDUP=0 explicitly at the job env level so
its semantics survive the default change. Retirement of that workflow
is a 30-day follow-up.
Closes #937 — the failure that triggered this work is the control
baseline's expected unprotected behaviour; with default-on it falls
back into the path the dedup-mode workflow has been exercising clean
for 12 consecutive days.
Verified:
- go vet ./... clean
- go build ./... clean
- go test -run 'Dedup|OnePhase|PrevCommit|Idempot' ./adapter/ — pass
- go test -run 'TestRedis|TestList|TestSet|TestZSet|TestStream|TestExec|TestMulti'
./adapter/ — pass (169s)
- golangci-lint run ./adapter/... — 0 issues1 parent 71a8241 commit a6af333
2 files changed
Lines changed: 32 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
42 | 55 | | |
43 | 56 | | |
44 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
251 | 252 | | |
252 | 253 | | |
253 | 254 | | |
254 | 255 | | |
255 | 256 | | |
256 | 257 | | |
257 | 258 | | |
258 | | - | |
259 | | - | |
260 | | - | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
261 | 265 | | |
262 | 266 | | |
263 | 267 | | |
| |||
495 | 499 | | |
496 | 500 | | |
497 | 501 | | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
503 | 509 | | |
504 | 510 | | |
505 | 511 | | |
| |||
0 commit comments