You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Apurva Mehta (JIRA)" <ji...@apache.org> on 2016/09/23 18:36:21 UTC
[jira] [Comment Edited] (KAFKA-4204)
KafkaService.verify_reassign_partitions is a no-op
[ https://issues.apache.org/jira/browse/KAFKA-4204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15517207#comment-15517207 ]
Apurva Mehta edited comment on KAFKA-4204 at 9/23/16 6:36 PM:
--------------------------------------------------------------
Another issue with {{KafkaService.verify_reassign_partitions}}: it doesn't explicitly check for reassignment failure. Ie. any completion is a success. This means that it reports success even if the reassignment completely failed. This also needs to be addressed by any fix associated with this ticket.
was (Author: apurva):
Another issue with `KafkaService.verify_reassign_partitions`: it doesn't explicitly check for reassignment failure. Ie. any completion is a success. This means that it reports success even if the reassignment completely failed. This also needs to be addressed by any fix associated with this ticket.
> KafkaService.verify_reassign_partitions is a no-op
> ---------------------------------------------------
>
> Key: KAFKA-4204
> URL: https://issues.apache.org/jira/browse/KAFKA-4204
> Project: Kafka
> Issue Type: Bug
> Components: core
> Affects Versions: 0.10.0.1
> Reporter: Apurva Mehta
> Assignee: Apurva Mehta
>
> In the 'verify_reassign_partitions' method of the KafkaService class in the system tests, we execute the kafka-reassign-partitions command and then do a regular expression match on the tools output to verify that the reassignment succeeded.
> In particular, we search for the pattern 'is in progress' in the output string. If the pattern exists, it means that the reassignment is still in progress.
> As it stands, this mechanism is broken because the tool outputs 'is still in progress' for each reassignment which hasn't completed. Further, the tool outputs a multi-line string, but the regex does not factor this in.
> In general, depending on a specific pattern on stdout to determine success or failure of an operation like reassignment is very fragile.
> The right thing to do would be for the tool to output a well defined data structure, which can be accurately interpreted by the test or any other program which needs that information.
> This JIRA is going to track the discussion and progress for implementing the latter.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)