refactor: move slot hashing to ember-protocol, deprecate concurrent mode#358
Merged
Conversation
ember-core depended on the entire ember-cluster crate (pulling openraft, postcard, uuid, and hmac into the core engine's build) solely to call key_slot(). The CRC16/hash-tag slot primitives are a property of the key, not of cluster membership, so they now live in ember_protocol::slots — the leaf crate both core and cluster already sit on top of. ember-cluster re-exports key_slot and SLOT_COUNT, so its API is unchanged; ember-core drops the ember-cluster dependency entirely. concurrent mode (--concurrent / EMBER_CONCURRENT) is now deprecated: the server logs a startup warning, and the example config, helm values, and ARCHITECTURE.md are marked accordingly. The mode only accelerates string commands, is mutually exclusive with cluster mode, and maintains a ~2,900-line parallel connection handler; removal is planned for a future release (0.4.8's changelog already believed it was gone).
c141dd7 to
10d2be5
Compare
kacy
added a commit
that referenced
this pull request
Jul 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 4 of a 5-PR cleanup series from a full-codebase audit.
What
ember-coredepended on all ofember-cluster— transitively compiling openraft, postcard, uuid, and hmac into the core engine — to call one function,key_slot(). The CRC16 table, hash-tag extraction,key_slot, andSLOT_COUNTnow live inember_protocol::slots(the leaf crate: bytes/itoa/memchr/thiserror only).ember-clusterre-exports both public names so nothing downstream changes;ember-coredrops itsember-clusterdependency entirely. The Redis test vectors (CLUSTER KEYSLOTconformance) moved with the code.warn!when--concurrent/EMBER_CONCURRENTis set, deprecation notes inember.example.toml, helm values, ARCHITECTURE.md, and anunreleasedCHANGELOG section. No code removed — the mode still works.Verification
clippy -D warningsclean, 1,520 unit tests pass.ember-server --concurrentlocally: the deprecation warning logs and the mode still serves traffic (healthcheck PING returns healthy).