fix(kinesis): route partition keys by MD5 hash range (#8198)

* fix(kinesis): route partition keys by MD5 hash range

* fix(kinesis): preserve reshard ranges and index writes
This commit is contained in:
Jimmy Liu Jia authored and GitHub committed 2026-11-13 09:18:30 -04:00
1 parent 9bb384903a
commit 9ee8ba4e11
7 files changed
+411 -104

No files matched your search

+7 -7
View File
@@ -107,13 +107,13 @@ A stream's retention period (default 24 hours, `IncreaseStreamRetentionPeriod`/`
value must be a decimal integer in the Kinesis hash-key space, and records are
written to the open shard whose `HashKeyRange` contains that value.
Without `ExplicitHashKey`, Floci uses the partition key's Java hash modulo the
number of stored shards, including closed shards. If this selects a closed
shard, it follows split and merge lineage through any closed intermediate shards
to the first open descendant in breadth-first, stored-shard order. Writes never
append to a closed shard or fall back to an unrelated open shard. A lineage with
no reachable open shard fails the write. This simplified ordinary-key placement
differs from AWS's MD5 hash-range routing.
Without `ExplicitHashKey`, Kinesis takes the MD5 digest of the partition key's
UTF-8 bytes as an unsigned 128-bit integer. Floci writes to the open shard whose
`HashKeyRange` contains that value, including after a split or merge. Closed
historical shards are never selected. Untouched legacy streams whose open root
shards all persisted the full hash span are repartitioned before selection.
Other overlapping stored ranges are rejected rather than rewriting existing
child ranges or records.
## Shard Scaling (UpdateShardCount)