Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Requests to the PUT /connector-plugins/{connectorType}/config/validate endpoint are delegated to the herder, which caches connector instances that are used during config validation. This has the effect that, should concurrent requests to that endpoint occur for the same connector type, the same connector instance may be responsible for validating those configurations concurrently (may instead of will because there is also a race condition in the AbstractHerder::getConnector method that potentially fails to detect that an instance of the connector has already been created and, as a result, creates a second instance KAFKA-12704).
This is slightly problematic because the Connector::validate method is not marked as thread-safe. However, because a lot of connectors out there tend to use the default implementation for that method, it's probably not super urgent that we patch this immediately.
A couple of options are:
- Update the docs for that method to specify that it must be thread-safe
- Rewrite the connector validation logic in the framework to avoid concurrently invoking Connector::validate on the same instance.
Attachments
Issue Links
- is related to
-
KAFKA-12704 Concurrent calls to AbstractHerder::getConnector can potentially create two connector instances
- Resolved