What is AssignReplicasToDirs?
The KRaft controller assigns partition replicas to specific log directories on a broker, for multi-disk and tiered storage configurations. When a new log directory is added, replicas can be redistributed across directories through this API rather than needing a full cross-broker reassignment.
Wire Diagram
Response Header · flexible
message_size
int32 · 4B
correlation_id
int32 · 4B
tagged
var
AssignReplicasToDirsResponse v0
ThrottleTimeMs
int32 · 4B
ErrorCode
int16 · 2B
tagged
var
Id
uuid · 16B
tagged
var
TopicId
uuid · 16B
tagged
var
PartitionIndex
int32 · 4B
ErrorCode
int16 · 2B
tagged
var
Schema & Example
Schema { "ThrottleTimeMs": int32, "ErrorCode": int16, "Directories": [{ "Id": uuid, "Topics": [{ "TopicId": uuid, "Partitions": [{ "PartitionIndex": int32, "ErrorCode": int16 }] }] }] }
Example { "ThrottleTimeMs": 0, "ErrorCode": 0, "Directories": [{ "Id": "550e8400-e29b-41d4-a716-446655440000", "Topics": [{ "TopicId": "550e8400-e29b-41d4-a716-446655440000", "Partitions": [{ "PartitionIndex": 3, "ErrorCode": 0 }] }] }] }