-
Notifications
You must be signed in to change notification settings - Fork 4
add option for specifying timeout in minutes and gtid position together with last known pk #139
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
Conversation
b1c28a4 to
d55dac4
Compare
Signed-off-by: Max Englander <max@planetscale.com>
d55dac4 to
dae88cc
Compare
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.
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- cmd/airbyte-source/spec.json: Language not supported
Signed-off-by: Max Englander <max@planetscale.com>
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.
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- cmd/airbyte-source/spec.json: Language not supported
| table := s.Stream | ||
| readDuration := 5 * time.Minute | ||
| timeout := 5 * time.Minute | ||
| if timeoutSeconds := ps.TimeoutSeconds; timeoutSeconds != nil { |
Copilot
AI
Apr 5, 2025
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.
The current implementation does not enforce the minimum timeout of 5 minutes as required. Consider adding a condition to set the timeout to 5 minutes if the provided value is less than that.
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.
no thanks, it's useful to be able to use values less than 5m in testing
Currently when airbyte-source syncs it wipes out `gtid` information from the shard gtid before passing it along in the VStream request. This means that, upon retry, it's possible for the connector to lose rows that are inserted between the `gtid` of the last `vgtid` event it received in one attempt and the `@@gtid_executed` of the next sync attempt. This new option changes the current behavior so that `gtid` is always passed along in the VStream request, if it is available. This makes for a safer retry. However, it does mean that it is possible for the connector to received duplicates of the same row. How it will look in Airbyte UI after upgrading to a version with this change. <img width="849" alt="image" src="https://github.com/user-attachments/assets/5d699e82-3e37-4459-a833-365f717cea15" /> Signed-off-by: Max Englander <max@planetscale.com>
Add two new options.
Specifying timeout in minutes
Make the current hardcoded 5 minute read duration configurable. Keep 5 minutes as the default and minimum. This is how it will look on connectors that upgrade to a version containing this change:
GTID position with last known PK
Currently when airbyte-source syncs it wipes out
gtidinformation from the shard gtid before passing it along in the VStream request. This means that, upon retry, it's possible for the connector to lose rows that are inserted between thegtidof the lastvgtidevent it received in one attempt and the@@gtid_executedof the next sync attempt.This new option changes the current behavior so that
gtidis always passed along in the VStream request, if it is available. This makes for a safer retry. However, it does mean that it is possible for the connector to received duplicates of the same row.How it will look in Airbyte UI after upgrading to a version with this change.