This is an automated email from the ASF dual-hosted git repository.
rhauch pushed a commit to branch 2.6
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/2.6 by this push:
new a35c503 KAFKA-12904: Corrected the timeout for config validation REST
API resource (#10834)
a35c503 is described below
commit a35c503b2e5734d1f99ba7f72d2c00f4423e72d1
Author: Randall Hauch <[email protected]>
AuthorDate: Tue Jun 22 09:15:13 2021 -0500
KAFKA-12904: Corrected the timeout for config validation REST API resource
(#10834)
The constant is specified in milliseconds, and so the MILLISECOND time unit
should be used instead of SECONDS.
Author: Randall Hauch <[email protected]>
Reviewer: Konstantine Karantasis <[email protected]>
---
.../kafka/connect/runtime/rest/resources/ConnectorPluginsResource.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/resources/ConnectorPluginsResource.java
b/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/resources/ConnectorPluginsResource.java
index 1f6161e..0854c8f 100644
---
a/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/resources/ConnectorPluginsResource.java
+++
b/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/resources/ConnectorPluginsResource.java
@@ -88,7 +88,7 @@ public class ConnectorPluginsResource {
herder.validateConnectorConfig(connectorConfig, validationCallback,
false);
try {
- return
validationCallback.get(ConnectorsResource.REQUEST_TIMEOUT_MS, TimeUnit.SECONDS);
+ return
validationCallback.get(ConnectorsResource.REQUEST_TIMEOUT_MS,
TimeUnit.MILLISECONDS);
} catch (TimeoutException e) {
// This timeout is for the operation itself. None of the timeout
error codes are relevant, so internal server
// error is the best option