yashmayya opened a new pull request, #14003: URL: https://github.com/apache/kafka/pull/14003
- From https://issues.apache.org/jira/browse/KAFKA-15182: >See discussion [here](https://github.com/apache/kafka/pull/13945#discussion_r1260946148) > > TLDR: When users attempt to externally modify source connector offsets via the `PATCH /offsets` endpoint (introduced in [KIP-875](https://cwiki.apache.org/confluence/display/KAFKA/KIP-875%3A+First-class+offsets+support+in+Kafka+Connect)), type mismatches can occur between offsets passed to `SourceConnector::alterOffsets` and the offsets that are retrieved by connectors / tasks via an instance of `OffsetStorageReader` after the offsets have been modified. In order to prevent this type mismatch that could lead to subtle bugs in connectors, we could serialize + deserialize the offsets using the worker's internal JSON converter before invoking `SourceConnector::alterOffsets`. - I've also added a small unit test, verified that the existing offsets API related integration tests are passing, and tested this patch out manually with the `FileStreamSourceConnector`. ### Committer Checklist (excluded from commit message) - [ ] Verify design and implementation - [ ] Verify test coverage and CI build status - [ ] Verify documentation (including upgrade notes) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org