Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
public enum CoordinatorType { 
    GROUP((byte) 0), 
    TRANSACTION((byte) 1), 
    SHARE((byte) 2),
    MIRROR((byte) 3); // New type
}

Errors

List of protocol-level errors returned in API responses:

...

Mirror Metadata Records

LastMirroredOffsets

...

Code Block
{
  "apiKey": 2,
  "type": "coordinator-key",
  "name": "MirrorPartitionStateKey",
  "validVersions": "0",
  "flexibleVersions": "none",
  "fields": [
    { "name": "MirrorName", "type": "string", "versions": "0",
      "about": "The cluster mirror name."}
  ]
}

{
  "apiKey": 2,
  "type": "coordinator-value",
  "name": "MirrorPartitionStateValue",
  "validVersions": "0",
  "flexibleVersions": "0+",
  "fields": [
    { "name": "TopicName", "type": "string", "versions": "0",
      "about": "The topic name."},
    { "name": "Partition", "type": "int32", "versions": "0",
      "about": "The partition index."},
    { "name": "State", "type": "int8", "versions": "0+",
      "about": "The mirror partition state." }
  ]
}

Errors

List of protocol-level errors returned in API responses:

Error CodeNameUsed ByContext
3UNKNOWN_TOPIC_OR_PARTITIONMirrorMetadataManagerSource topic metadata has errors during sync
15COORDINATOR_NOT_AVAILABLEMirrorCoordinatorMirror coordinator is not active
31CLUSTER_AUTHORIZATION_FAILEDKafkaApis, ControllerApisMissing authorization for mirror operations
35UNSUPPORTED_VERSIONKafkaApis, ControllerApisCluster mirroring disabled (mirror.version=0)
38INVALID_REPLICATION_FACTORReplicationControlManagerInsufficient brokers for mirror topic replication
39INVALID_REPLICA_ASSIGNMENTReplicationControlManagerBrokers fenced or in controlled shutdown
42INVALID_REQUESTKafkaApis, ConfigurationControlManagerValidation failures (direct mirror.name modification, mirror disabled, invalid config)

Configuration

A new configuration resource type is added for cluster mirrors, which is stored in the cluster metadata internal log. Both DescribeConfigs and IncrementalAlterConfigs will be bumped to new versions so that clients can check ApiVersionsResponse to determine whether the broker supports mirror configuration management, rather than having to send a request and interpret the error.

...