Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use auto flush configuration from client config string #22

Merged
merged 5 commits into from
May 24, 2024

Conversation

jerrinot
Copy link
Collaborator

@jerrinot jerrinot commented May 23, 2024

Connector flushing behaviour should now be more intuitive:

  1. It's configured via client conf. string as all other clients.
  2. If there are no new events for the duration of the allowed.lag period then the connector flushes even if the auto_flush_interval is not yet expired. This reduces latency without sacrificing maximum throughput: If there is a continuous stream of events then the connector will flush only when either auto_flush_interval expires or the connector accumulates more than auto_flush_rows rows.

Implementation notes
The connector reads flushing parameters from client configuration string. The conf. string is then patched to disable flushing entirely and this patched string is used to create an ILP client instance. This means the client won't ever auto-flush on its own and the connector is solely responsible for calling explicit flush(). This design has performance advantages: Kafka Connect delivers messages in batches and the connector can flush after only finishing the current batch. This has performance advantages over flushing mid-batch.

@jerrinot jerrinot force-pushed the jh_auto_flush_improvements branch from c639737 to 4cb82b6 Compare May 24, 2024 11:24
this is no longer needed
@jerrinot jerrinot marked this pull request as ready for review May 24, 2024 12:16
@jerrinot jerrinot changed the title feat: connectors uses auto flush configuration from client config string feat: use auto flush configuration from client config string May 24, 2024
@jerrinot jerrinot merged commit bb38893 into main May 24, 2024
2 checks passed
@jerrinot jerrinot deleted the jh_auto_flush_improvements branch May 24, 2024 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant