FAILURE MAP
← Case archive

FA-45761 / Data systems / Open access

Exchange looks up row identity instead of the routing key · case 01

Exchange looks up row identity instead of the routing key.

Verified by executionVariant 1 · 7 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

partition-exchange-routing: Exchange looks up row identity instead of the routing key.

VERIFIED REPAIR

Preserve the stated physical representation and operation order: Route [id,key,payload] rows into fixed receiver partitions using a supplied key-to-partition table. Null keys use the explicit null partition; unmapped non-null keys produce UNMAPPED side output. Preserve source order within each receiver, retain empty receivers, and preserve repeated rows.

Unsuccessful approach: Payload lookup also ignores the routing key.

Case contract

Route [id,key,payload] rows into fixed receiver partitions using a supplied key-to-partition table. Null keys use the explicit null partition; unmapped non-null keys produce UNMAPPED side output. Preserve source order within each receiver, retain empty receivers, and preserve repeated rows.

Why this case matters

A bounded deterministic data engine model makes representation and changelog faults reproducible.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    try:
        rows,mapping,null_partition,count=d
        receivers=[[] for _ in range(count)]; rejected=[]
        for ident,key,payload in rows:
            if key is None: target=null_partition
            elif str(ident) in mapping: target=mapping[str(ident)]
            else: rejected.append([ident,'UNMAPPED']); continue
            receivers[target].append([ident,payload])
        return [receivers,rejected]
    except (IndexError, KeyError, ValueError, StopIteration) as exc:
        return {"representation_error": type(exc).__name__}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
    check('independent receivers', solve([[[10, 1, 1], [11, 2, 2]], {'1': 0, '2': 1}, 1, 3]), [[[[10, 1]], [[11, 2]], []], []])
    check('null receiver', solve([[[10, None, 1]], {}, 1, 3]), [[[], [[10, 1]], []], []])
    check('unmapped', solve([[[10, 7, 1]], {'1': 0}, 1, 2]), [[[], []], [[10, 'UNMAPPED']]])
    check('same receiver order', solve([[[11, 1, 1], [10, 1, 2]], {'1': 0}, 1, 2]), [[[[11, 1], [10, 2]], []], []])
    check('duplicate rows', solve([[[10, 1, 1], [10, 1, 1]], {'1': 0}, 1, 2]), [[[[10, 1], [10, 1]], []], []])
    check('mapped zero', solve([[[10, 0, 1]], {'0': 1}, 0, 2]), [[[], [[10, 1]]], []])
    check('empty relation', solve([[], {}, 0, 2]), [[[], []], []])
elif N == 2:
    check('independent receivers', solve([[[10, 1, 2], [11, 2, 3]], {'1': 0, '2': 1}, 1, 3]), [[[[10, 2]], [[11, 3]], []], []])
    check('null receiver', solve([[[10, None, 2]], {}, 1, 3]), [[[], [[10, 2]], []], []])
    check('unmapped', solve([[[10, 7, 2]], {'1': 0}, 1, 2]), [[[], []], [[10, 'UNMAPPED']]])
    check('same receiver order', solve([[[11, 1, 2], [10, 1, 3]], {'1': 0}, 1, 2]), [[[[11, 2], [10, 3]], []], []])
    check('duplicate rows', solve([[[10, 1, 2], [10, 1, 2]], {'1': 0}, 1, 2]), [[[[10, 2], [10, 2]], []], []])
    check('mapped zero', solve([[[10, 0, 2]], {'0': 1}, 0, 2]), [[[], [[10, 2]]], []])
    check('empty relation', solve([[], {}, 0, 2]), [[[], []], []])
elif N == 3:
    check('independent receivers', solve([[[10, 1, 3], [11, 2, 4]], {'1': 0, '2': 1}, 1, 3]), [[[[10, 3]], [[11, 4]], []], []])
    check('null receiver', solve([[[10, None, 3]], {}, 1, 3]), [[[], [[10, 3]], []], []])
    check('unmapped', solve([[[10, 7, 3]], {'1': 0}, 1, 2]), [[[], []], [[10, 'UNMAPPED']]])
    check('same receiver order', solve([[[11, 1, 3], [10, 1, 4]], {'1': 0}, 1, 2]), [[[[11, 3], [10, 4]], []], []])
    check('duplicate rows', solve([[[10, 1, 3], [10, 1, 3]], {'1': 0}, 1, 2]), [[[[10, 3], [10, 3]], []], []])
    check('mapped zero', solve([[[10, 0, 3]], {'0': 1}, 0, 2]), [[[], [[10, 3]]], []])
    check('empty relation', solve([[], {}, 0, 2]), [[[], []], []])
elif N == 4:
    check('independent receivers', solve([[[10, 1, 4], [11, 2, 5]], {'1': 0, '2': 1}, 1, 3]), [[[[10, 4]], [[11, 5]], []], []])
    check('null receiver', solve([[[10, None, 4]], {}, 1, 3]), [[[], [[10, 4]], []], []])
    check('unmapped', solve([[[10, 7, 4]], {'1': 0}, 1, 2]), [[[], []], [[10, 'UNMAPPED']]])
    check('same receiver order', solve([[[11, 1, 4], [10, 1, 5]], {'1': 0}, 1, 2]), [[[[11, 4], [10, 5]], []], []])
    check('duplicate rows', solve([[[10, 1, 4], [10, 1, 4]], {'1': 0}, 1, 2]), [[[[10, 4], [10, 4]], []], []])
    check('mapped zero', solve([[[10, 0, 4]], {'0': 1}, 0, 2]), [[[], [[10, 4]]], []])
    check('empty relation', solve([[], {}, 0, 2]), [[[], []], []])
elif N == 5:
    check('independent receivers', solve([[[10, 1, 5], [11, 2, 6]], {'1': 0, '2': 1}, 1, 3]), [[[[10, 5]], [[11, 6]], []], []])
    check('null receiver', solve([[[10, None, 5]], {}, 1, 3]), [[[], [[10, 5]], []], []])
    check('unmapped', solve([[[10, 7, 5]], {'1': 0}, 1, 2]), [[[], []], [[10, 'UNMAPPED']]])
    check('same receiver order', solve([[[11, 1, 5], [10, 1, 6]], {'1': 0}, 1, 2]), [[[[11, 5], [10, 6]], []], []])
    check('duplicate rows', solve([[[10, 1, 5], [10, 1, 5]], {'1': 0}, 1, 2]), [[[[10, 5], [10, 5]], []], []])
    check('mapped zero', solve([[[10, 0, 5]], {'0': 1}, 0, 2]), [[[], [[10, 5]]], []])
    check('empty relation', solve([[], {}, 0, 2]), [[[], []], []])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
independent receivers[[[], [], []], [[10, 'UNMAPPED'], [11, 'UNMAPPED']]][[[[10, 1]], [[11, 2]], []], []]Failed
null receiver[[[], [[10, 1]], []], []][[[], [[10, 1]], []], []]Passed
unmapped[[[], []], [[10, 'UNMAPPED']]][[[], []], [[10, 'UNMAPPED']]]Passed
same receiver order[[[], []], [[11, 'UNMAPPED'], [10, 'UNMAPPED']]][[[[11, 1], [10, 2]], []], []]Failed
duplicate rows[[[], []], [[10, 'UNMAPPED'], [10, 'UNMAPPED']]][[[[10, 1], [10, 1]], []], []]Failed
mapped zero[[[], []], [[10, 'UNMAPPED']]][[[], [[10, 1]]], []]Failed
empty relation[[[], []], []][[[], []], []]Passed

SHA-256 / b51fe03cc16265f7b0da809e65ce35b8bd5b9b0da04e200fdd34606cf3b34970

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    try:
        rows,mapping,null_partition,count=d
        receivers=[[] for _ in range(count)]; rejected=[]
        for ident,key,payload in rows:
            if key is None: target=null_partition
            elif str(payload) in mapping: target=mapping[str(payload)]
            else: rejected.append([ident,'UNMAPPED']); continue
            receivers[target].append([ident,payload])
        return [receivers,rejected]
    except (IndexError, KeyError, ValueError, StopIteration) as exc:
        return {"representation_error": type(exc).__name__}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
    check('independent receivers', solve([[[10, 1, 1], [11, 2, 2]], {'1': 0, '2': 1}, 1, 3]), [[[[10, 1]], [[11, 2]], []], []])
    check('null receiver', solve([[[10, None, 1]], {}, 1, 3]), [[[], [[10, 1]], []], []])
    check('unmapped', solve([[[10, 7, 1]], {'1': 0}, 1, 2]), [[[], []], [[10, 'UNMAPPED']]])
    check('same receiver order', solve([[[11, 1, 1], [10, 1, 2]], {'1': 0}, 1, 2]), [[[[11, 1], [10, 2]], []], []])
    check('duplicate rows', solve([[[10, 1, 1], [10, 1, 1]], {'1': 0}, 1, 2]), [[[[10, 1], [10, 1]], []], []])
    check('mapped zero', solve([[[10, 0, 1]], {'0': 1}, 0, 2]), [[[], [[10, 1]]], []])
    check('empty relation', solve([[], {}, 0, 2]), [[[], []], []])
elif N == 2:
    check('independent receivers', solve([[[10, 1, 2], [11, 2, 3]], {'1': 0, '2': 1}, 1, 3]), [[[[10, 2]], [[11, 3]], []], []])
    check('null receiver', solve([[[10, None, 2]], {}, 1, 3]), [[[], [[10, 2]], []], []])
    check('unmapped', solve([[[10, 7, 2]], {'1': 0}, 1, 2]), [[[], []], [[10, 'UNMAPPED']]])
    check('same receiver order', solve([[[11, 1, 2], [10, 1, 3]], {'1': 0}, 1, 2]), [[[[11, 2], [10, 3]], []], []])
    check('duplicate rows', solve([[[10, 1, 2], [10, 1, 2]], {'1': 0}, 1, 2]), [[[[10, 2], [10, 2]], []], []])
    check('mapped zero', solve([[[10, 0, 2]], {'0': 1}, 0, 2]), [[[], [[10, 2]]], []])
    check('empty relation', solve([[], {}, 0, 2]), [[[], []], []])
elif N == 3:
    check('independent receivers', solve([[[10, 1, 3], [11, 2, 4]], {'1': 0, '2': 1}, 1, 3]), [[[[10, 3]], [[11, 4]], []], []])
    check('null receiver', solve([[[10, None, 3]], {}, 1, 3]), [[[], [[10, 3]], []], []])
    check('unmapped', solve([[[10, 7, 3]], {'1': 0}, 1, 2]), [[[], []], [[10, 'UNMAPPED']]])
    check('same receiver order', solve([[[11, 1, 3], [10, 1, 4]], {'1': 0}, 1, 2]), [[[[11, 3], [10, 4]], []], []])
    check('duplicate rows', solve([[[10, 1, 3], [10, 1, 3]], {'1': 0}, 1, 2]), [[[[10, 3], [10, 3]], []], []])
    check('mapped zero', solve([[[10, 0, 3]], {'0': 1}, 0, 2]), [[[], [[10, 3]]], []])
    check('empty relation', solve([[], {}, 0, 2]), [[[], []], []])
elif N == 4:
    check('independent receivers', solve([[[10, 1, 4], [11, 2, 5]], {'1': 0, '2': 1}, 1, 3]), [[[[10, 4]], [[11, 5]], []], []])
    check('null receiver', solve([[[10, None, 4]], {}, 1, 3]), [[[], [[10, 4]], []], []])
    check('unmapped', solve([[[10, 7, 4]], {'1': 0}, 1, 2]), [[[], []], [[10, 'UNMAPPED']]])
    check('same receiver order', solve([[[11, 1, 4], [10, 1, 5]], {'1': 0}, 1, 2]), [[[[11, 4], [10, 5]], []], []])
    check('duplicate rows', solve([[[10, 1, 4], [10, 1, 4]], {'1': 0}, 1, 2]), [[[[10, 4], [10, 4]], []], []])
    check('mapped zero', solve([[[10, 0, 4]], {'0': 1}, 0, 2]), [[[], [[10, 4]]], []])
    check('empty relation', solve([[], {}, 0, 2]), [[[], []], []])
elif N == 5:
    check('independent receivers', solve([[[10, 1, 5], [11, 2, 6]], {'1': 0, '2': 1}, 1, 3]), [[[[10, 5]], [[11, 6]], []], []])
    check('null receiver', solve([[[10, None, 5]], {}, 1, 3]), [[[], [[10, 5]], []], []])
    check('unmapped', solve([[[10, 7, 5]], {'1': 0}, 1, 2]), [[[], []], [[10, 'UNMAPPED']]])
    check('same receiver order', solve([[[11, 1, 5], [10, 1, 6]], {'1': 0}, 1, 2]), [[[[11, 5], [10, 6]], []], []])
    check('duplicate rows', solve([[[10, 1, 5], [10, 1, 5]], {'1': 0}, 1, 2]), [[[[10, 5], [10, 5]], []], []])
    check('mapped zero', solve([[[10, 0, 5]], {'0': 1}, 0, 2]), [[[], [[10, 5]]], []])
    check('empty relation', solve([[], {}, 0, 2]), [[[], []], []])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
independent receivers[[[[10, 1]], [[11, 2]], []], []][[[[10, 1]], [[11, 2]], []], []]Passed
null receiver[[[], [[10, 1]], []], []][[[], [[10, 1]], []], []]Passed
unmapped[[[[10, 1]], []], []][[[], []], [[10, 'UNMAPPED']]]Failed
same receiver order[[[[11, 1]], []], [[10, 'UNMAPPED']]][[[[11, 1], [10, 2]], []], []]Failed
duplicate rows[[[[10, 1], [10, 1]], []], []][[[[10, 1], [10, 1]], []], []]Passed
mapped zero[[[], []], [[10, 'UNMAPPED']]][[[], [[10, 1]]], []]Failed
empty relation[[[], []], []][[[], []], []]Passed

SHA-256 / 4b59cdd1c7e8cb43c236fed33228f45c53d1a4f91e4f709042e419477f5f17b6

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    try:
        rows,mapping,null_partition,count=d
        receivers=[[] for _ in range(count)]; rejected=[]
        for ident,key,payload in rows:
            if key is None: target=null_partition
            elif str(key) in mapping: target=mapping[str(key)]
            else: rejected.append([ident,'UNMAPPED']); continue
            receivers[target].append([ident,payload])
        return [receivers,rejected]
    except (IndexError, KeyError, ValueError, StopIteration) as exc:
        return {"representation_error": type(exc).__name__}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
    check('independent receivers', solve([[[10, 1, 1], [11, 2, 2]], {'1': 0, '2': 1}, 1, 3]), [[[[10, 1]], [[11, 2]], []], []])
    check('null receiver', solve([[[10, None, 1]], {}, 1, 3]), [[[], [[10, 1]], []], []])
    check('unmapped', solve([[[10, 7, 1]], {'1': 0}, 1, 2]), [[[], []], [[10, 'UNMAPPED']]])
    check('same receiver order', solve([[[11, 1, 1], [10, 1, 2]], {'1': 0}, 1, 2]), [[[[11, 1], [10, 2]], []], []])
    check('duplicate rows', solve([[[10, 1, 1], [10, 1, 1]], {'1': 0}, 1, 2]), [[[[10, 1], [10, 1]], []], []])
    check('mapped zero', solve([[[10, 0, 1]], {'0': 1}, 0, 2]), [[[], [[10, 1]]], []])
    check('empty relation', solve([[], {}, 0, 2]), [[[], []], []])
elif N == 2:
    check('independent receivers', solve([[[10, 1, 2], [11, 2, 3]], {'1': 0, '2': 1}, 1, 3]), [[[[10, 2]], [[11, 3]], []], []])
    check('null receiver', solve([[[10, None, 2]], {}, 1, 3]), [[[], [[10, 2]], []], []])
    check('unmapped', solve([[[10, 7, 2]], {'1': 0}, 1, 2]), [[[], []], [[10, 'UNMAPPED']]])
    check('same receiver order', solve([[[11, 1, 2], [10, 1, 3]], {'1': 0}, 1, 2]), [[[[11, 2], [10, 3]], []], []])
    check('duplicate rows', solve([[[10, 1, 2], [10, 1, 2]], {'1': 0}, 1, 2]), [[[[10, 2], [10, 2]], []], []])
    check('mapped zero', solve([[[10, 0, 2]], {'0': 1}, 0, 2]), [[[], [[10, 2]]], []])
    check('empty relation', solve([[], {}, 0, 2]), [[[], []], []])
elif N == 3:
    check('independent receivers', solve([[[10, 1, 3], [11, 2, 4]], {'1': 0, '2': 1}, 1, 3]), [[[[10, 3]], [[11, 4]], []], []])
    check('null receiver', solve([[[10, None, 3]], {}, 1, 3]), [[[], [[10, 3]], []], []])
    check('unmapped', solve([[[10, 7, 3]], {'1': 0}, 1, 2]), [[[], []], [[10, 'UNMAPPED']]])
    check('same receiver order', solve([[[11, 1, 3], [10, 1, 4]], {'1': 0}, 1, 2]), [[[[11, 3], [10, 4]], []], []])
    check('duplicate rows', solve([[[10, 1, 3], [10, 1, 3]], {'1': 0}, 1, 2]), [[[[10, 3], [10, 3]], []], []])
    check('mapped zero', solve([[[10, 0, 3]], {'0': 1}, 0, 2]), [[[], [[10, 3]]], []])
    check('empty relation', solve([[], {}, 0, 2]), [[[], []], []])
elif N == 4:
    check('independent receivers', solve([[[10, 1, 4], [11, 2, 5]], {'1': 0, '2': 1}, 1, 3]), [[[[10, 4]], [[11, 5]], []], []])
    check('null receiver', solve([[[10, None, 4]], {}, 1, 3]), [[[], [[10, 4]], []], []])
    check('unmapped', solve([[[10, 7, 4]], {'1': 0}, 1, 2]), [[[], []], [[10, 'UNMAPPED']]])
    check('same receiver order', solve([[[11, 1, 4], [10, 1, 5]], {'1': 0}, 1, 2]), [[[[11, 4], [10, 5]], []], []])
    check('duplicate rows', solve([[[10, 1, 4], [10, 1, 4]], {'1': 0}, 1, 2]), [[[[10, 4], [10, 4]], []], []])
    check('mapped zero', solve([[[10, 0, 4]], {'0': 1}, 0, 2]), [[[], [[10, 4]]], []])
    check('empty relation', solve([[], {}, 0, 2]), [[[], []], []])
elif N == 5:
    check('independent receivers', solve([[[10, 1, 5], [11, 2, 6]], {'1': 0, '2': 1}, 1, 3]), [[[[10, 5]], [[11, 6]], []], []])
    check('null receiver', solve([[[10, None, 5]], {}, 1, 3]), [[[], [[10, 5]], []], []])
    check('unmapped', solve([[[10, 7, 5]], {'1': 0}, 1, 2]), [[[], []], [[10, 'UNMAPPED']]])
    check('same receiver order', solve([[[11, 1, 5], [10, 1, 6]], {'1': 0}, 1, 2]), [[[[11, 5], [10, 6]], []], []])
    check('duplicate rows', solve([[[10, 1, 5], [10, 1, 5]], {'1': 0}, 1, 2]), [[[[10, 5], [10, 5]], []], []])
    check('mapped zero', solve([[[10, 0, 5]], {'0': 1}, 0, 2]), [[[], [[10, 5]]], []])
    check('empty relation', solve([[], {}, 0, 2]), [[[], []], []])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
independent receivers[[[[10, 1]], [[11, 2]], []], []][[[[10, 1]], [[11, 2]], []], []]Passed
null receiver[[[], [[10, 1]], []], []][[[], [[10, 1]], []], []]Passed
unmapped[[[], []], [[10, 'UNMAPPED']]][[[], []], [[10, 'UNMAPPED']]]Passed
same receiver order[[[[11, 1], [10, 2]], []], []][[[[11, 1], [10, 2]], []], []]Passed
duplicate rows[[[[10, 1], [10, 1]], []], []][[[[10, 1], [10, 1]], []], []]Passed
mapped zero[[[], [[10, 1]]], []][[[], [[10, 1]]], []]Passed
empty relation[[[], []], []][[[], []], []]Passed

SHA-256 / de2e5fed5fb62a9449df6b11d5c61154551e73704e6ca931adc6e6ed915acff7

Verification & scope

Offline stipulated semantics over valid small inputs; no performance, concurrency, or production-engine conformance claim. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:44:25.485052+00:00.

Case digest / 5ef7681ef360c6f05665ae21557ba2180d7efc4927bacca70615be1d0d2f3734