Versions Compared

Key

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

...

Immediate delete scenarios

Scenario 1:Stale reads

  1. Broker B1 is a leader for topic partition A_p0_id0
  2. Topic A id0 is deleted.
  3. Topic A id1 is created.
  4. Broker B1 has not yet received a new LeaderAndIsrRequest, nor a StopReplicaRequest for topic partition A_p0_id0
  5. Broker B2 has received a LeaderAndIsrRequest for topic partition A_p0 _id0, and starts fetching from B1.

We need the changes to Inclusion of topic IDs in FetchRequest/ListOffsetRequest/OffsetsForLeaderEpochRequest described above to make the above scenario (s) ensure that this scenario is safe. By including adding the topic ID in to these requests, we can prevent a broker from accidentally replicating from a deleted topic with the same name.request types, any request to stale partitions will not be successful.

Stale stateScenario 2:

  1. Broker B1 is a replica for A_p0_id0.
  2. Topic A id0 is deleted.
  3. B1 and has not does not receive a StopReplicaRequest for A_p0_id0.
  4. Topic A id1 is created.
  5. Broker B1 receives a LeaderAndIsrRequest containing partition A_p0_id1.

...