Current state: "Under Discussion"
Discussion thread: here [Change the link from the KIP proposal email archive to your own email thread]
JIRA: here [Change the link from KAFKA-1 to your own ticket]
Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).
In Kafka Connect, the KafkaConfigBackingStore class is responsible for persistent storage of connector and task configurations in a Kafka topic. Currently, the timeout for synchronous write operations and then read back from the configuration topic is hardcoded via the READ_WRITE_TOTAL_TIMEOUT_MS constant, set to 30,000 milliseconds (30 seconds).
While 30 seconds is sufficient for many environments, this hardcoded limit can be problematic in specific scenarios:
readToEnd operation might time out.We have expressed the need to increase this timeout to avoid ConnectException during these spikes (see discussion thread here). This KIP proposes making this timeout a configurable worker parameter to allow operators to tune it according to their environment's performance characteristics.
A new connector configuration will be added to the Kafka Connect `DistributedConfig` class:
Property | Value |
Type | Long |
Default | 30000 |
Importance | Low |
Description | The timeout in milliseconds for synchronous read and write operations to the Kafka Connect configuration storage topic. This determines how long the worker will wait for operations like publishing connector configurations and reading the current state of the cluster before throwing a timeout error. The value of this parameter should not be higher than max.poll.interval.ms to interfere with the unhealthy worker detection. |
The KafkaConfigBackingStore class will be modified to accept the timeout value from the configuration. Currently, the code uses a static final long:
static final long READ_WRITE_TOTAL_TIMEOUT_MS = 30000;
The proposed implementation will:
CONFIG_STORAGE_KAFKA_STORE_READ_WRITE_TIMEOUT_MS_CONFIG to DistributedConfig class with the default value of 30000KafkaConfigBackingStore use the parameter defined in ConnectorConfigThis change is fully backward compatible. The default value of 30,000ms matches the current hardcoded value, so existing clusters will see no change in behavior unless they explicitly override the new configuration.