Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Correction to ShareGroupPartitionMetadataValue

...

Here an example of how the assignments might change as members join the share group and the number of partitions changes.

State

Members subscribed to T1

Topic:partitions

Assignment change

Assignments

M1 subscribed to topic T1 with 1 partition

M1 (hash 1)

T1:0

Assign T1:0 to M1

M1 → T1:0

M2 joins the group and subscribes to T1

M1 (hash 1), M2 (hash 2)

T1:0

Assign T1:0 to M2

M1 → T1:0

M2 → T1:0

Add 3 partitions to T1

M1 (hash 1), M2 (hash 2)

T1:0, T1:1, T1:2, T1:3

Assign T1:1 and T1:3 to M2

Revoke T1:0 from M2

Assign T1:2 to M1

M1 → T1:0, T1:2

M2 → T1:1, T1:3

M3 joins the group and subscribes to T1

M1 (hash 1), M2 (hash 2), M3 (hash 3)

T1:0, T1:1, T1:2, T1:3

Assign T1:2 to M3

Revoke T1:2 from M1

M1 → T1:0

M2 → T1:1, T1:3

M3 → T1:2

M4 joins the group and subscribes to T1

M1 (hash 1), M2 (hash 2), M3 (hash 3), M4 (hash 4)

T1:0, T1:1, T1:2, T1:3

Assign T1:3 to M4

Revoke T1:3 from M2

M1 → T1:0

M2 → T1:1

M3 → T1:2

M4 → T1:3

M5, M6, M7, M8 join the group and subscribe to T1

M1 (hash 1), M2 (hash 2), M3 (hash 3), M4 (hash 4), M5 (hash 5), M6 (hash 6), M7 (hash 7), M8 (hash 8)

T1:0, T1:1, T1:2, T1:3

Assign T1:0 to M5

Assign T1:1 to M6

Assign T1:2 to M7

Assign T1:3 to M8

M1 → T1:0

M2 → T1:1

M3 → T1:2

M4 → T1:3

M5 → T1:0

M6 → T1:1

M7 → T1:2

M8 → T1:3

M1 subscribes to T2 with 2 partitions

M1 (hash 1), M2 (hash 2), M3 (hash 3), M4 (hash 4), M5 (hash 5), M6 (hash 6), M7 (hash 7), M8 (hash 8)

T1:0, T1:1, T1:2, T1:3

T2:0, T2:1

Assign T2:0 and T2:1 to M1

M1 → T1:0, T2:0, T2:1

M2 → T1:1

M3 → T1:2

M4 → T1:3

M5 → T1:0

M6 → T1:1

M7 → T1:2

M8 → T1:3

All members leave except M2

M2 (hash 2)

T1:0, T1:1, T1:2, T1:3

Assign T1:0, T1:2, T1:3 to M2

M2 → T1:0, T1:1, T1:2, T1:3

SimpleShareAssignor does not make assignments based on rack IDs. SimpleShareAssignor does not make assignments based on lag or consumer throughput.

...

Code Block
{
  "type": "data",
  "name": "ShareGroupPartitionMetadataValue",
  "validVersions": "9",
  "flexibleVersions": "none",
  "fields": [
     { "name": "Epoch", "versions": "0+", "type": "int32" },
     { "name": "Topics", "versions": "0+", "type": "[]TopicMetadata", "fields": [ },
         { "name": "TopicIdInitializingTopics", "versions": "0+", "type": "uuid[]TopicIndexMetadata" },
         { "name": "NumPartitionsDeletingTopics", "versions": "0+", "type": "int32[]TopicMetadata" }
  ],
   ]},"commonStructs": [
     { "name": "InitializingTopicsTopicMetadata", "versions": "0+", "type": "[]TopicMetadata", "fields": [
         { "name": "TopicId", "type": "uuid", "versions": "0+",
        "typeabout": "uuidThe topic identifier." },
      {   {"name": "NumPartitions", "nametype": "StartPartitionIndexint32", "versions": "0+",
        "typeabout": "int32The number of partitions." }
    ]},
         { "name": "EndPartitionIndexTopicIndexMetadata", "versions": "0+", "typefields": "int32" }[
     ]},
     { "name": "DeletingTopicsTopicId", "versions": "0+", "type": "[]TopicMetadatauuid", "fields": [ },
         { "name": "TopicIdStartPartitionIndex", "versions": "0+", "type": "uuidint32" },
         { "name": "NumPartitionsEndPartitionIndex", "versions": "0+", "type": "int32" }
     ]}
   ]
}

The InitializingTopics  field is used as the first stage of a two-stage process to initialize the persistent state for a set of share-partitions. When the share coordinator successfully responds to InitializeShareGroupState  , the topic-partitions are moved into the Topics  field.

...