fix(inkless:metadata): route consolidating partitions with one replica to the replica #844
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 229 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.325
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #844"
general
weight: 0.35
viktorsomogyi
Consumers of a consolidating diskless topic with one replica get
NOT_LEADER_OR_FOLLOWERand stay on the broker that returned it.A diskless topic can have replication factor 1. Managed replicas accepts it, and a topic created before managed replicas stays at one replica. With consolidation on, that topic consolidates from creation, or an existing topic consolidates when
remote.storage.enableis set later. Either way it keeps that one replica, and only the replica stores the local log that serves reads.InklessTopicMetadataTransformerchose its path from the replica count, so a partition with one replica kept hashing over every alive broker. A client sent to any other broker gotNOT_LEADER_OR_FOLLOWER. The hash is stable, so the metadata refresh returned the same broker and the client retried the same failure.The migration guide required a replication-factor increase before the alter of an untiered topic. A topic created consolidating at replication factor 1 had no such step, and consumers failed the same way. The transformer now routes a partition to its replicas whenever remote storage is on, at every replication factor: same-AZ replica, then cross-AZ replica, then unavailable. A partition with more than one replica already took that path. Untiered topics with one replica keep hash-based routing, because every broker can serve them. Raising the replication factor stays optional, for same-AZ reads and for availability while the replica's broker is down.
Test plan
SingleReplicaDisklessTieredtransformer tests for Metadata and DescribeTopicPartitions.testClientRoutingOfUntieredAndConsolidatedTopics, which fails without this change.make vale.Assisted-by: Claude Opus 5.5