Skip to content

feat: concurrent mode proto support and integration tests - #86

Merged
kacy merged 4 commits into
mainfrom
feat/protobuf-concurrent-integration
Feb 10, 2026
Merged

feat: concurrent mode proto support and integration tests#86
kacy merged 4 commits into
mainfrom
feat/protobuf-concurrent-integration

Conversation

@kacy

@kacy kacy commented Feb 10, 2026

Copy link
Copy Markdown
Owner

summary

  • adds proto command handling to the concurrent (DashMap) mode handler, routing key commands (SET/GET/TYPE) through the engine's sharded fallback and schema-only commands (REGISTER/SCHEMAS/DESCRIBE) directly through the engine's registry
  • adds 10 end-to-end integration tests covering the full PROTO.* command surface: schema registration, set/get/type, NX/XX flags, TTL, wrong type errors, invalid data rejection, and AOF persistence recovery
  • adds cmd_raw() helper to TestClient for sending binary protobuf data, and a protobuf option to ServerOptions

what was tested

  • cargo test -p ember-integration-tests -- proto — all 10 proto integration tests pass
  • cargo test -p ember-integration-tests — full integration suite passes (78/79, the flushdb test has a pre-existing race condition when run in parallel)
  • cargo clippy --features protobuf -- -D warnings — clean
  • cargo clippy -- -D warnings — clean
  • cargo fmt -- --check — clean

design considerations

  • concurrent mode routes proto key commands through the engine's sharded fallback path since ConcurrentKeyspace only stores raw Bytes and doesn't have a Value::Proto variant. this means proto values in concurrent mode go through channels like in sharded mode, but schema-only operations (REGISTER/SCHEMAS/DESCRIBE) are fast-path direct access
  • integration tests use prost-reflect to build test fixtures (descriptors and encoded messages) programmatically rather than hardcoding bytes, keeping tests readable and maintainable
  • persistence recovery test verifies the full round-trip: register schema, set proto value, kill server, restart from AOF, verify data recovered

kacy added 4 commits February 10, 2026 13:21
routes proto key commands (SET/GET/TYPE) through the engine's sharded
fallback path since ConcurrentKeyspace doesn't support Value::Proto.
schema-only commands (REGISTER/SCHEMAS/DESCRIBE) access the engine's
schema registry directly. mirrors the sharded connection handler.
adds 10 end-to-end integration tests covering the full proto command
surface: register/describe schemas, set/get/type proto values, NX/XX
flags, TTL, wrong type errors, invalid descriptor/data rejection, and
AOF persistence recovery.

adds cmd_raw() helper to TestClient for sending binary proto data,
and a protobuf option to ServerOptions for starting the server with
--protobuf.
adds 5 concurrent-mode tests mirroring the core sharded tests:
register/describe, set/get/type, invalid data rejection, NX/XX flags,
and missing key handling. adds concurrent option to ServerOptions.
total proto integration tests: 15 (10 sharded + 5 concurrent).
@kacy
kacy merged commit dc910ae into main Feb 10, 2026
5 of 7 checks passed
@kacy
kacy deleted the feat/protobuf-concurrent-integration branch February 10, 2026 18:42
kacy added a commit that referenced this pull request Feb 11, 2026
* feat: add proto command support to concurrent mode handler

routes proto key commands (SET/GET/TYPE) through the engine's sharded
fallback path since ConcurrentKeyspace doesn't support Value::Proto.
schema-only commands (REGISTER/SCHEMAS/DESCRIBE) access the engine's
schema registry directly. mirrors the sharded connection handler.

* feat: add proto integration tests and concurrent mode formatting

adds 10 end-to-end integration tests covering the full proto command
surface: register/describe schemas, set/get/type proto values, NX/XX
flags, TTL, wrong type errors, invalid descriptor/data rejection, and
AOF persistence recovery.

adds cmd_raw() helper to TestClient for sending binary proto data,
and a protobuf option to ServerOptions for starting the server with
--protobuf.

* chore: update Cargo.lock for integration test prost-reflect dep

* feat: add concurrent mode proto integration tests

adds 5 concurrent-mode tests mirroring the core sharded tests:
register/describe, set/get/type, invalid data rejection, NX/XX flags,
and missing key handling. adds concurrent option to ServerOptions.
total proto integration tests: 15 (10 sharded + 5 concurrent).
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