-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
🐛 Set cdc record subsequent record wait time to initial wait time as a workaround #35114
Changes from 6 commits
24b428f
ab037a9
d9dbb83
330ff55
1c120e4
d88c53b
150c912
df82289
9125618
c17f3c8
cf2fe44
85cf63d
268604b
7137744
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,6 @@ | |
import com.mongodb.client.MongoClient; | ||
import com.mongodb.client.MongoDatabase; | ||
import io.airbyte.cdk.integrations.debezium.AirbyteDebeziumHandler; | ||
import io.airbyte.cdk.integrations.debezium.internals.RecordWaitTimeUtil; | ||
import io.airbyte.commons.json.Jsons; | ||
import io.airbyte.commons.util.AutoCloseableIterator; | ||
import io.airbyte.commons.util.AutoCloseableIterators; | ||
|
@@ -80,8 +79,14 @@ public List<AutoCloseableIterator<AirbyteMessage>> createCdcIterators( | |
final Instant emittedAt, | ||
final MongoDbSourceConfig config) { | ||
|
||
final Duration firstRecordWaitTime = RecordWaitTimeUtil.getFirstRecordWaitTime(config.rawConfig()); | ||
final Duration subsequentRecordWaitTime = RecordWaitTimeUtil.getSubsequentRecordWaitTime(config.rawConfig()); | ||
// LOGGER.info("*** config {}", config.rawConfig()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit : remove this commented out log line |
||
final Duration firstRecordWaitTime = Duration.ofSeconds(config.getInitialWaitingTimeSeconds()); | ||
// #35059: debezium heartbeats are not sent on the expected interval. this is a worksaround to allow | ||
// making | ||
// subsequent wait time configurable. | ||
// final Duration subsequentRecordWaitTime = firstRecordWaitTime.dividedBy(2); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the goal to make the subsequent record wait time half of the first record wait time or the same? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct. |
||
final Duration subsequentRecordWaitTime = firstRecordWaitTime; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. a max of 10 minutes may not be enough. |
||
LOGGER.info("*** subs {} init {}", subsequentRecordWaitTime, firstRecordWaitTime); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we have a log line here like : "Subsequent record wait time is : {}" to make it more clear? |
||
final int queueSize = MongoUtil.getDebeziumEventQueueSize(config); | ||
final String databaseName = config.getDatabaseName(); | ||
final boolean isEnforceSchema = config.getEnforceSchema(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we not define initial waiting time in the spec already?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For mongo cdc, I think we'll always be assured that initial wait time in seconds is populated, so we can remove the defaults
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack - that is unfortunate