You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(design): address Claude round-4 review on logical backup proposal
Important (verified against adapter/redis.go):
- Stream TTLs were silently dropped. Streams can carry TTL via
EXPIRE/PEXPIRE/PEXPIREAT, kept in !redis|ttl| by buildTTLElems
(adapter/redis.go:2471). Added expire_at_ms to the _meta line so
restore re-applies the original epoch.
- HLL TTLs were silently dropped. HLL is reported as redisTypeString
but stores TTL in the legacy scan index (adapter/redis.go:2319-2320
comment confirms it). Added hll_ttl.jsonl sidecar at the db_<n>
root, same shape as strings_ttl.jsonl. Sidecar is omitted when no
HLL key has a TTL.
- Fixed XADD NOMKSTREAM semantic error in the skip-existing
description. NOMKSTREAM only prevents stream creation; it does
not skip entries by ID. Replaced with the correct mechanism:
attempt XADD and treat the "ID equal or smaller" ERR as
"already present, skip."
Minor:
- Added --begin-backup-deadline 5s to the elastickv-backup dump CLI
block (the prose mentioned it but the flag list lagged).
Tests added: TestRedisStreamTTLRoundTrip, TestRedisHLLTTLRoundTrip,
TestRedisStreamSkipExistingHandlesERR.
| `TestRedisTTLExpiredKeySkippedByDefault` | A key whose `expire_at_ms` is in the past at restore time is not re-applied without `--preserve-ttl`; with the flag it is re-applied with the original epoch |
1090
1117
| `TestRedisStreamMergeRejectsNonEmpty` | `--mode merge` on a non-empty target stream errors out; `--stream-merge-strategy=auto-id` falls back to `XADD *` and writes `_id_remap.jsonl` |
1118
+
| `TestRedisStreamTTLRoundTrip` | A stream with `PEXPIREAT` round-trips through dump and restore: `expire_at_ms` is captured in the `_meta` line and re-applied so the restored stream expires at the original epoch |
1119
+
| `TestRedisHLLTTLRoundTrip` | A TTL'd HLL key surfaces in `hll_ttl.jsonl` and is re-applied on restore via the same `EXPIREAT` path used for strings; no-TTL HLLs leave `hll_ttl.jsonl` absent |
1120
+
| `TestRedisStreamSkipExistingHandlesERR` | The restore tool's `skip-existing` path tolerates `ERR The ID specified in XADD is equal or smaller` without aborting the dump; entries with non-conflicting IDs are still applied |
0 commit comments