Skip to content

Feat/hlc instance id wiring - #352

Merged
jcshepherd merged 10 commits into
mainfrom
fix/hlc-instance-id-wiring
Sep 21, 2026
Merged

jcshepherd merged 10 commits into
mainfrom
fix/hlc-instance-id-wiring

Conversation

@jcshepherd

Copy link
Copy Markdown
Collaborator

What

Make a "instance id" (host+listening port) available to the backend via StorageConfig.

Why

Related to the Cassandra backend mega-PR (#338). Cassandra doesn't support sequences reliably. For stream record sequence numbers in the Cassandra backend, we're using hybrid logical clock (HLC)
values instead. The tie-breaker (which would only be needed under extremely high write loads) is a hash value seeded by instance id assigned at 'serve'. This is unique per node, stable across restarts and valid even when multiple nodes are run on a single host.

Testing done

cargo test --workspace
devtools/run-tests --extenddb --pytest (reviewed and ignoring unrelated CLI test failures)

Checklist

  • I have read CONTRIBUTING.md
  • All tests pass (cargo test --workspace)
  • Code is formatted (cargo fmt --check)
  • Clippy is clean (cargo clippy -- -W clippy::pedantic)
  • I have added or updated tests for new functionality
  • I have updated documentation if behavior changed
  • Breaking changes are noted below (if any)
  • If this changes the wire protocol, Storage trait, auth model, on-disk
    format, or public CLI surface, an RFC has been accepted or is linked
    below. Otherwise, an ADR captures the decision (link below).

By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache License 2.0 and I agree to the Developer Certificate of
Origin (DCO). See CONTRIBUTING.md for details.

@jcshepherd jcshepherd changed the title Fix/hlc instance id wiring Feat/hlc instance id wiring Sep 15, 2026
Backends that need per-node identity (e.g. to construct unique hybrid logical clock (HLC) values
for stream sequence ids), can receive an identity via StorageConfig during extenddb serve. Default
implementations to avoid breaking backends that don't need this.
@jcshepherd
jcshepherd force-pushed the fix/hlc-instance-id-wiring branch from 29d2e17 to 02314fb Compare September 15, 2026 20:52
@jcshepherd
jcshepherd added this pull request to the merge queue Sep 18, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Sep 18, 2026
@jcshepherd
jcshepherd added this pull request to the merge queue Sep 21, 2026
Merged via the queue into main with commit d23943e Sep 21, 2026
29 checks passed
@jcshepherd
jcshepherd deleted the fix/hlc-instance-id-wiring branch September 21, 2026 22:44
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.

2 participants