Versions Compared

Key

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

...

Code Block
onPartitionsReassigned() 
{
  p.RAR = the new replicas from /brokers/partitions_reassigned/[topic]/[partition_id]
  if(a new replica is to be reassigned to follower R)
     send start-replica state change request to R
}

State change operations

...

Start replica state change

This state change is requested by the leader for a new replica assignment

Code Block
replicaStateChangestartReplica(r: Replica) {
  if( r's log is not already started) {
     do local recovery of r's log
     r.hw = min(last checkpointed HW for r, r.leo)
      register a leader-change listener on partition r.partition.partition_id
  }
   if( a leader does not exist for partition r.partition.partition_id in ZK)
      leaderElection(r)
}

...