Versions Compared

Key

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

...

When the number of available brokers is less than the replication factor and no assignment is specified, creating an under-replicated topic/partition can be enabled. For example, creating a topic with replication factor 3, in a 3-zones region with 1 broker per region, but a zone is down or a rolling restart is happening.

In case a topic or partition is created under-replicated, the error code will be NONE in the CreateTopics and CreatePartition response
s.

Public Interfaces

Broker Configuration

...

  • Async replica assignment: Instead of relying on previously known brokers, we considered creating replicas on the available brokers at topic/partition create time and saving in zookeeper some information to asynchronously create missing replicas on the next suitable brokers that would join the cluster. Such a process would involve the controller checking if missing replicas existed when a broker joins the cluster. This alternative felt too complicated. Also the next joining broker may not be on the preferred rack assignment.
  • Update CreateTopicsRequest and CreatePartitionsRequest to allow users to disable creation of under replicated topics. This approach felt too complicatedoption adds an extra configuration to think abobut to end users and it's unclear how many people would want to take advantageo of such a feature.
  • Update schema of CreateTopicsResponse and CreatePartitionsResponse to contain the actual replication factor at creation. Like assignments, it's not data the client can act on.
  • Create a new error code when a topic/partition is created under replicated. As this is not an error case, it's best to keep returning NONE to avoid breaking existing logic We think the error message associated with the new error code can suffice.