Thanks for taking a look José! Can you explain why you need another CLI (kafka-unclean-recovery) > instead of extending the existing CLI (kafka-elect-leader) to support > this use case?
kafka-elect-leader has a fairly focused function - "do elections of a specific type for these partitions" - I'm in favour of keeping it focused in this sense. Because unclean-recovery is not a "type" of election in a similar way to "preferred" and "unclean" are - I think it should be either a separate tool entirely or at least be put behind a "switch" within kafka-elect-leaders. Did you consider adding a CLI command to display the results of > GetReplicaLogInfo. It would be nice to query and understand the state > of the offline partitions before the unclean leader election. The tool would support two arguments - --manual-recovery-output-file and --show-replica-info. The former is sort of like a "dry run" and will create a JSON file with designated leader elections based on log length which may be supplied to kafka-elect-leaders. --show-replica-info will print a table showing the results of GetReplicaLogInfoRequests on targeted partitions. It should be possible to use only --show-replica-info for the given topics. Related to your previous question - I think this functionality is quite separate from what kafka-elect-leader currenty performs so more so for separate tool. Best, Jonah On Fri, Feb 6, 2026 at 11:48 AM José Armando García Sancio via dev < [email protected]> wrote: > Thanks for the proposal Jonah. > > Can you explain why you need another CLI (kafka-unclean-recovery) > instead of extending the existing CLI (kafka-elect-leader) to support > this use case? It would be nice if we can add this functionality to > kafka-elect-leader instead of adding another CLI. > > Did you consider adding a CLI command to display the results of > GetReplicaLogInfo. It would be nice to query and understand the state > of the offline partitions before the unclean leader election. > > Thanks, > -- > -José >
