Bedrock.DataPlane.CommitProxy.ConflictSharding (bedrock v0.6.0)
View SourceShards transaction conflicts across resolvers by key range.
Takes transaction conflict sections and creates resolver-specific transaction binaries containing only conflicts within each resolver's key range.
Process
- Extract read/write conflicts from transaction sections
- Distribute conflict ranges across resolvers using sweep algorithm
- Split ranges that span multiple resolver boundaries
- Build Transaction-format binaries for each resolver
Usage
sharded_transactions = ConflictSharding.shard_conflicts_across_resolvers(
transaction_sections,
resolver_ends, # [{end_key, resolver_pid}]
resolver_refs # [resolver_pid]
)
# Returns %{resolver_pid => transaction_binary}