Implementing new config variable poll.sleep.ms #1349
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
When running the jdbc source connector in bulk mode (
mode=bulk
) theJdbcSourceTask
fetches the whole table in one goSELECT * 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 theJdbcSourceTask
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?
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:
Release Plan