...
The znode value will now contain an additional topic ID field, represented as a base64 string in the "id" field, and the schema version will be bumped to version 3.
Schema:
{ "fields" :
[ {"name": "version", "type": "int", "id": "UUID", },
{"name": "id", "type": "string", "doc": "version id"}},
{"name": "partitions",
"type": {"type": "map",
"values": {"type": "array", "items": "int", "doc": "a list of replica ids"},
"doc": "a map from partition id to replica list"},
{"name": "adding_replicas",
"type": {"type": "map",
"values": {"type": "array", "items": "int", "doc": "a list of replica ids"},
"doc": "version ida map from partition id to a list of replicas to add in a pending reassignment"}, {"name": "partitionsremoving_replicas",
"type": {"type": "map",
"values": {"type": "array", "items": "int", "doc": "a list of replica ids"},
"doc": "a map from partition id to replica lista list of replicas to remove in a pending reassignment"},
}
]
}
Example:
{
"version": 3,
"id": "b8tRS7h4TJ2Vt43Dp85v2A",
"partitions": {"0": [0, 1, 3] ] },
"adding_replicas": {},
"removing_replicas": {}
} |
The controller will maintain local in-memory state containing a mapping from topic name to topic ID. On controller startup, the topic ID will automatically be loaded into memory along with the topics and partitions. A random UUID will be generated on topic creation or on migration of an existing topic without topic IDs.
...
LeaderAndIsr Response (Version: 5) => error_code [partitionstopics]
error_code => INT16
partitions topics => topic_id* partition error_code
[partitions]
topic_id* => UUID
partitions => topic_id* partition error_code
partition => INT32
error_code => INT16
|
The topic name field has been removed.
...
StopReplica Response (Version: 4) => error_code [partitionstopics]
error_code => INT16
partitions topics => topic topic_id* partition error_code
[partitions]
topic => STRING
topic_id* => UUID
partitions => topic_id* partition error_code
partition => INT32
error_code => INT16
|
Fetch
To avoid issues where requests are made to stale partitions, a topic_id field will be added to fence reads from deleted topics. Note that the leader epoch is not sufficient for preventing these issues, as the partition leader epoch is reset when a topic is deleted and recreated. To reduce the size of the request and response, the topic name field has been removed.
...
Fetch Request (Version: 13) => replica_id max_wait_time min_bytes max_bytes isolation_level session_id session_epoch [topics] [forgotten_topics_data] rack_id
replica_id => INT32
max_wait_time => INT32
min_bytes => INT32
max_bytes => INT32
isolation_level => INT8
session_id => INT32
session_epoch => INT32
topics => topic_id* [partitions]
topic_id* => UUID
partitions => partition current_leader_epoch fetch_offset log_start_offset partition_max_bytes
partition => INT32
current_leader_epoch => INT32
fetch_offset => INT64
log_start_offset => INT64
partition_max_bytes => INT32
forgotten_topics_data => topic_id* [partitions]
topic topic_id* => STRINGUUID
partitions => INT32
rack_id => STRING
|
...