Hey guys,

We seem to have dropped the functionality to produce to a random partition
by setting partition to -1 in 0.8. Presumably this is because we can no
longer just choose a partition randomly, but need to pick a partition for
which the given broker is a leader.

Questions/Comments
1. Not sure if this was intentional or if the code just got dropped...
2. Arguably it would be nice to continue to support this functionality to
allow a simple partition unaware producer, but I actually don't think it
will work because there is no guarantee that a given broker is a leader for
ANY partitions. So I think this functionality has to move into the
producers (it isn't complex, but that means all producers must be partition
aware).
3. Regardless this functionality should NOT have been in log manager, which
is responsible for managing logs and shouldn't have business logic (like
inferring that an invalid partition id means choosing a random partition).
4. I am deleting the random assignment stuff from log manager as part of
KAFKA-371 since it isn't used and I don't think it can be used in 0.8

Cheers,

-Jay

Reply via email to