Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Update read/write state schemas

...

ReadMirrorStatesRequest

Code Block
{
    "apiKey": TBD,
    "type": "request",
    "listeners": ["broker", "controller"],
    "name": "ReadMirrorStatesRequest",
    "validVersions": "0",
    "flexibleVersions": "0+",
    "fields": [
        { "name": "MirrorName", "type": "string", "versions": "0+", "about": "The mirror name." },
        { "name": "Topics", "type": "[]TopicStateTopicData", "versions": "0",
            "about": "The data responsesfor perthe topictopics.", "fields": [
            { "name": "Name", "type": "string", "versions": "0", "entityType": "topicName",
                "about": "The topic name." },
            { "name": "Partitions", "type": "[]PartitionStatePartitionData", "versions": "0",
                "about": "The data responsesfor perthe partitionpartitions.", "fields": [
                { "name": "PartitionIndex", "type": "int32", "versions": "0",
                    "about": "The partition index." }
        ]}
      ]},
    { "name": "NeedPartitionStates", "type": "bool", "versions": "0+", "default": "true",
      "about": "Need the partition states or only topics states needed." }
   ]}
      ]}
  ]
}

ReadMirrorStatesResponse

Code Block
{
    "apiKey": TBD,
    "type": "response",
    "name": "ReadMirrorStatesResponse",
    "validVersions": "0",
    "flexibleVersions": "0+",
    "fields": [
        { "name": "ThrottleTimeMs", "type": "int32", "versions": "0+",
            "about": "The duration in milliseconds for which the request was throttled due to a quota violation, or zero if the request did not violate any quota." },
        { "name": "ErrorCode", "type": "int16", "versions": "0+",
            "about": "The error code, or 0 if there was no error." },
        { "name": "Topics", "type": "[]TopicStateTopicResult", "versions": "0",
            "about": "The read results responsesfor perthe topictopics.", "fields": [
      : [
      { "name": "Name", "type": "string", "versions": "0", "entityType": "topicName",
                "about": "The topic name." },
            { "name": "Partitions", "type": "[]PartitionStatePartitionResult", "versions": "0",
                "about": "The responsesresults for perthe partitionpartitions.", "fields": [
                { "name": "PartitionIndex", "type": "int32", "versions": "0",
                    "about": "The partition index." },
                { "name": "LastMirroredOffset", "type": "int64", "versions": "0",
                    "about": "The last mirrored record offset." },
                { "name": "stateState", "type": "int8", "versions": "0+",
                    "about": "The mirror partition state." },
                { "name": "ErrorCode", "type": "int16", "versions": "0",
                    "about": "The error code, or 0 if there was no error." }
            ]}
        ]}
    ]
}

WriteMirrorStates

The WriteMirrorStates RPC writes mirror state updates to the coordinator broker when it resides on a different node than the requesting broker.

WriteMirrorStatesRequest

Code Block
{
    "apiKey": TBD,
    "type": "request",
    "listeners": ["broker", "controller"],
    "name": "WriteMirrorStatesRequest",
    "validVersions": "0",
    "flexibleVersions": "0+",
    "fields": [
        { "name": "MirrorName", "type": "string", "versions": "0+", "about": "The mirror name." },
        { "name": "TopicsUpdatedTopics", "type": "[]TopicStateTopicData", "versions": "0",
            "about": "The topicsdata tofor bethe updatedtopics.", "fields": [
            { "name": "Name", "type": "string", "versions": "0", "entityType": "topicName",
                "about": "The topic name." },
            { "name": "Partitions", "type": "[]PartitionStatePartitionData", "versions": "0",
                "about": "The data responsesfor perthe partitionpartitions.", "fields": [
                { "name": "PartitionIndex", "type": "int32", "versions": "0",
                    "about": "The partition index." },
                { "name": "LastMirroredOffset", "type": "int64", "versions": "0",
                    "about": "The last mirrored record offset." },
                { "name": "stateState", "type": "int8", "versions": "0+",
                    "about": "The mirror partition state." }
            ]}
        ]},
        { "name": "RemovedTopics", "type": "[]string", "versions": "0+", "about": "The topic names to be removed." }
    ]
}

WriteMirrorStatesResponse

Code Block
{
    "apiKey": TBD,
    "type": "response",
    "name": "WriteMirrorStatesResponse",
    "validVersions": "0",
    "flexibleVersions": "0+",
    "fields": [
        { "name": "ThrottleTimeMs", "type": "int32", "versions": "0+",
            "about": "The duration in milliseconds for which the request was throttled due to a quota violation, or zero if the request did not violate any quota." },
        { "name": "ErrorCode", "type": "int16", "versions": "0+",
            "about": "The error code, or 0 if there was no error." },
        { "name": "Topics", "type": "[]TopicStateTopicResult", "versions": "0",
            "about": "The write results responsesfor perthe topictopics.", "fields": [
            { "name": "Name", "type": "string", "versions": "0", "entityType": "topicName",
                "about": "The topic name." },
            { "name": "Partitions", "type": "[]PartitionStatePartitionResult", "versions": "0",
                "about": "The responsesresults for perthe partitionpartitions.", "fields": [
                { "name": "PartitionIndex", "type": "int32", "versions": "0",
                    "about": "The partition index." },
                { "name": "ErrorCode", "type": "int16", "versions": "0",
                    "about": "The error code, or 0 if there was no error." }
            ]}
        ]}
    ]
}

FindCoordinatorRequest

...