You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by kk...@apache.org on 2020/03/22 20:08:12 UTC

[kafka] branch 2.5 updated: KAFKA-9634: Add note about thread safety in the ConfigProvider interface (#8205)

This is an automated email from the ASF dual-hosted git repository.

kkarantasis pushed a commit to branch 2.5
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/2.5 by this push:
     new f9d0ec3  KAFKA-9634: Add note about thread safety in the ConfigProvider interface (#8205)
f9d0ec3 is described below

commit f9d0ec39cc5fd46ef8371e22c667af4e25e17906
Author: Tom Bentley <to...@users.noreply.github.com>
AuthorDate: Sun Mar 22 19:58:21 2020 +0000

    KAFKA-9634: Add note about thread safety in the ConfigProvider interface (#8205)
    
    In Kafka Connect, a ConfigProvider instance can be used concurrently (e.g. via a PUT request to the `/connector-plugins/{connectorType}/config/validate` REST endpoint), but there is no mention of concurrent usage in the Javadocs of the ConfigProvider interface.
    
    It's worth calling out that implementations need to be thread safe.
    
    Reviewers: Konstantine Karantasis <ko...@confluent.io>
---
 .../java/org/apache/kafka/common/config/provider/ConfigProvider.java     | 1 +
 1 file changed, 1 insertion(+)

diff --git a/clients/src/main/java/org/apache/kafka/common/config/provider/ConfigProvider.java b/clients/src/main/java/org/apache/kafka/common/config/provider/ConfigProvider.java
index 8561511..fe65ddf 100644
--- a/clients/src/main/java/org/apache/kafka/common/config/provider/ConfigProvider.java
+++ b/clients/src/main/java/org/apache/kafka/common/config/provider/ConfigProvider.java
@@ -25,6 +25,7 @@ import java.util.Set;
 
 /**
  * A provider of configuration data, which may optionally support subscriptions to configuration changes.
+ * Implementations are required to safely support concurrent calls to any of the methods in this interface.
  */
 public interface ConfigProvider extends Configurable, Closeable {