mirror of
https://github.com/floci-io/floci.git
synced 2026-12-06 03:28:18 -05:00
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:
1 parent
9bb384903a
commit
9ee8ba4e11
7 files changed
+411
-104
No files matched your search
@@ -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)
|
||||
|
||||
|
||||
Reference in new issue
Block a user