Status
Current state: Under Discussion, Voting
Discussion threads: here (the original), here (a new one as PonyMail didn't manage to associate the new messages with the old one)
JIRA:
-
KAFKA-16445Getting issue details...
STATUS
Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).
Motivation
Connect REST API provides an endpoint /connectors/<id>/config
for a connector's configuration. The endpoint allows to GET
a connector's configuration and to PUT
a new configuration. The only way to update an existing connector's configuration is to get, modify, and put it using this endpoint. This may cause two issues:
- Potential lost modifications due to non-atomicity of the update. The configuration can be changed between
GET
andPUT
in an unrelated way. These changes will be overwritten. - Inconvenience, especially when working in a command line using tools like cURL.
HTTP has PATCH method specifically designed for partial updates. It can solve or mitigate the listed issues.
Public Interfaces
We will add PATCH
method to /connectors/<id>/config
endpoint in Connect REST API.
As JSON null
values aren't allowed in the connector configs, null
will serve as a tombstore value used for deleting existing fields from configs.
Proposed Changes
We will add PATCH
method definition into ConnectorsResource
, which will call the actual logic in Herder
and its child classes StandaloneHerder
and DistributedHerder
. Due to the way how the herders are implemented now, it's difficult to guarantee 100% race-free partial updates. Besides, other similar race scenarios exist, so we keep out of scope of this KIP. The implementation will attempt to keep the race window as narrow as possible.
There is a draft pull request: https://github.com/apache/kafka/pull/6934
Compatibility, Deprecation, and Migration Plan
This change is backward compatible.
Rejected Alternatives
No rejected alternatives.