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

Implementing new config variable poll.sleep.ms #1349

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

akohlbecker
Copy link

@akohlbecker akohlbecker commented Jul 4, 2023

Problem

When running the jdbc source connector in bulk mode (mode=bulk) the JdbcSourceTask fetches the whole table in one go SELECT * FROM {table}. poll.interval.ms determines the speed by which the records are sent to the target topic.
Once all records a committed to the topic the next SELECT query is sent to the data base system. There is no other option to reduce the frequency of requests being send to the DB than increasing poll.interval.ms which slows down the process of committing the messages to the target topic.

This leads to a paradox situation if you want to poll a table only once day for example.

Solution

With this pull request is suggest adding a poll.sleep.ms setting that allows the JdbcSourceTask to sleep after the whole table result set has been consumed.

This setting can be used to limit the frequency at which the SQL server is being queried
without limiting the processing speed of already obtained result sets.

Does this solution apply anywhere else?
  • yes
  • no
If yes, where?

Test Strategy

Test implemented : io.confluent.connect.jdbc.source.JdbcSourceTaskUpdateTest.testBulkPeriodicLoadWithPollSleep()

Integration tests implemented in other branch, which are using the Filemaker dialect for which this fork has been created:

Manual tests done in so far, as this feature is being used in production at us.

Testing done:
  • Unit tests
  • Integration tests
  • System tests
  • Manual tests

Release Plan

@akohlbecker akohlbecker requested a review from a team as a code owner July 4, 2023 16:34
@cla-assistant
Copy link

cla-assistant bot commented Aug 1, 2023

CLA assistant check
All committers have signed the CLA.

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