Skip to content

feat: pre-launch quick wins (COMMAND, HINCRBYFLOAT, Z*STORE, helm pvc, npm publish)#331

Merged
kacy merged 3 commits intomainfrom
fix/deps-and-ci
Feb 27, 2026
Merged

feat: pre-launch quick wins (COMMAND, HINCRBYFLOAT, Z*STORE, helm pvc, npm publish)#331
kacy merged 3 commits intomainfrom
fix/deps-and-ci

Conversation

@kacy
Copy link
Owner

@kacy kacy commented Feb 27, 2026

summary

pre-launch polish pass covering the most impactful gaps identified in the audit.

new commands

  • COMMAND / COMMAND COUNT / COMMAND INFO / COMMAND DOCS — static metadata table for 150+ commands. this is what redis client libraries (jedis, lettuce, redis-py, ioredis) probe on connect to discover command metadata. without it those clients emit warnings or refuse to start.
  • HINCRBYFLOAT — float increment on hash fields. rounds out the hash type alongside the existing HINCRBY.
  • ZUNIONSTORE / ZINTERSTORE / ZDIFFSTORE — sorted set store variants. reuses the existing ZUNION/ZINTER/ZDIFF logic, writes result to dest key. dest and source keys must hash to the same shard (same constraint as the read-only variants).

helm

  • added persistence section to values.yaml — off by default, enable with persistence.enabled=true and a PVC is created automatically
  • new pvc.yaml template
  • probes now use httpGet /health when metricsPort is configured (was bare tcpSocket before)
  • emptyDir fallback includes a prominent WARNING comment so nobody silently loses data in production

docs

  • readme: docker one-liner quickstart so people can try ember in seconds without installing anything
  • compatibility.md: all new commands marked ✓; MULTI/EXEC section expanded with cross-shard atomicity caveat and hash tag example
  • updated feature list to reflect HINCRBYFLOAT, ZUNIONSTORE/ZINTERSTORE/ZDIFFSTORE, COMMAND introspection

ci

  • release workflow: new npm job publishes ember-ts to npm on every tagged release
    • requires NPM_TOKEN secret in repo settings

what was tested

  • cargo check -p emberkv-core -p ember-protocol -p ember-server clean on both agents
  • COMMAND introspection: verified static table covers all 150+ commands with correct arity/flags
  • ZUNIONSTORE/ZINTERSTORE/ZDIFFSTORE: same routing + AOF pattern as existing ZUNION/ZINTER/ZDIFF
  • HINCRBYFLOAT: AOF records result string (not delta) — avoids float rounding drift on replay, consistent with INCRBYFLOAT
  • helm: helm template passes; probes render correctly with and without metricsPort

design notes

the COMMAND table is a static OnceLock<Vec<CommandEntry>> initialized at first call — no heap allocation on the hot path. COMMAND INFO name [name ...] returns nil for unknown commands (matching redis behavior). COMMAND DOCS returns an empty map — sufficient for client compat, avoids the maintenance burden of full docs inline.

ZUNIONSTORE/ZINTERSTORE/ZDIFFSTORE route to the dest key's shard. all source keys must share that shard (enforced with a MOVED error if not). this is the same constraint as RENAME and the existing cross-shard store ops.

kacy added 3 commits February 26, 2026 22:13
COMMAND (with COUNT, INFO, DOCS, LIST subcommands) provides the static
command metadata that client libraries like jedis, lettuce, and redis-py
call on connect for capability discovery. without it many clients refuse
to operate.

HINCRBYFLOAT follows the same pattern as HINCRBY and INCRBYFLOAT: it
increments a hash field's float value atomically, creating the field at 0
if absent. persisted to AOF as an HSET with the resulting value to avoid
float drift during replay.

both commands are wired through protocol parse, shard dispatch, execute,
and the CLI command table.
implements the sorted set store variants. each command computes the
corresponding set operation (union/intersection/diff) and writes the
result to a destination key, replacing whatever was there before.

routing follows the same pattern as SUNIONSTORE/SINTERSTORE/SDIFFSTORE:
all input keys and dest must land on the same shard, and we route to
dest's shard. aof persistence records a DEL+ZADD pair so recovery is
idempotent. keyspace notifications fire on dest with the FLAG_Z flag.

8 new unit tests cover basic behaviour, score summing, dest overwrite,
empty-result removal, and wrong-type error propagation.
…at updates

- add docker quickstart to readme (one-liner to get running immediately)
- helm: add persistence pvc support with emptyDir warning for production
- helm: use http /health probe when metrics port is configured
- add npm publish job to release workflow for ember-ts
- update compatibility.md: HINCRBYFLOAT, ZUNIONSTORE/ZINTERSTORE/ZDIFFSTORE, FLUSHALL, COMMAND introspection all marked ✓
- expand MULTI/EXEC cross-shard atomicity caveat with hash tag tip
@kacy kacy merged commit 55a04f0 into main Feb 27, 2026
@kacy kacy deleted the fix/deps-and-ci branch February 27, 2026 03:15
kacy added a commit that referenced this pull request Feb 27, 2026
kacy added a commit that referenced this pull request Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant