[
https://issues.apache.org/jira/browse/KAFKA-16320?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17924963#comment-17924963
]
Emanuele Sabellico commented on KAFKA-16320:
--------------------------------------------
Found the corresponding KIP: it's [KIP
4|https://cwiki.apache.org/confluence/display/KAFKA/KIP-4+-+Command+line+and+centralized+administrative+operations#KIP4Commandlineandcentralizedadministrativeoperations-CreateTopicsRequest(KAFKA-2945):(VotedandCommittedfor0.10.1.0)]
that describes this:
{quote}Setting a timeout <= 0 will validate arguments and trigger the create
topics and return immediately.
*
** This is essentially the fully asynchronous mode we have in the Zookeeper
tools today.
** The error code in the response will either contain an argument validation
exception or a timeout exception. If you receive a timeout exception, because
you asked for 0 timeout, you can assume the message was valid and the topic
creation was triggered.{quote}
> CreateTopics, DeleteTopics and CreatePartitions differences between Zookeeper
> and KRaft
> ---------------------------------------------------------------------------------------
>
> Key: KAFKA-16320
> URL: https://issues.apache.org/jira/browse/KAFKA-16320
> Project: Kafka
> Issue Type: Bug
> Affects Versions: 3.7.0
> Reporter: Emanuele Sabellico
> Assignee: Chia-Ping Tsai
> Priority: Minor
>
> Test number 0081 with these operations is failing in librdkafka when using
> KRaft but not when using Zookeeper. The test sets the operation timeout to 0
> and expects that those operations are executed asynchronously. The returned
> err was REQUEST_TIMED_OUT and it was converted to NO_ERROR if operation
> timeout is <= 0.
> With KRaft instead NO_ERROR is returned, but the topics aren't created or
> deleted.
> Also passing an invalid configuration option it's returning NO_ERROR instead
> of INVALID_CONFIG, that is what happens in Zookeeper or with KRaft if
> operation timeout is > 0.
> https://github.com/confluentinc/librdkafka/blob/a6d85bdbc1023b1a5477b8befe516242c3e182f6/tests/0081-admin.c#L5174C9-L5174C29
> {code:java}
> /* For non-blocking CreateTopicsRequests the broker
> * will returned REQUEST_TIMED_OUT for topics
> * that were triggered for creation -
> * we hide this error code from the application
> * since the topic creation is in fact in progress. */
> if (error_code == RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT &&
> rd_kafka_confval_get_int(&rko_req->rko_u.admin_request
> .options.operation_timeout) <=
> 0) {
> error_code = RD_KAFKA_RESP_ERR_NO_ERROR;
> this_errstr = NULL;
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)