Versions Compared

Key

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

...

When replicas are moved between directories, using the existing AlterReplicaLogDirs RPC, the receiving broker will start moving the replicas using AlterReplicaLogDirs threads as usual. When a future replica first catches out up the broker will asynchronously communicate the log directory change to the controller using the new RPC – AssignReplicasToDirs  – but keep the AlterReplicaLogDirs thread going. Once the broker receives confirmation of the metadata change then it briefly blocks appends to the old replica, makes sure the future log fully caches up and makes the switch. By delaying the metadata change until the future replica has caught up we minimize the chance of a log directory failure happening with an incorrect replica to log directory assignment in the metadata.

...