-
Notifications
You must be signed in to change notification settings - Fork 97
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
Wait for at least one record or PKM before returning even after timeout #669
Conversation
flow/connectors/utils/env.go
Outdated
return val | ||
} | ||
|
||
func IsTestEnv() bool { |
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.
This is generally pretty dangerous unless used carefully. Since it means you aren't testing when !IsTestEnv
& that's the case that matters
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.
100% agreed - filed: #672 and will follow-up with fixing the tests. The urgency in landing the PR is for a ongoing issue.
de1d8c5
to
c6f0f1e
Compare
c6f0f1e
to
8274773
Compare
Earlier the flow was on connection timeout we would return the currently accumulated records. Now the
continue
and resetting the standby deadline, means that we will continue waiting for newer records in case we don't have any records or PKMs.The reason we exit at all from
PullRecords
is to checkpoint. We store metadata on the destination corresponding to committed LSN and we do it in batches because data warehouses operate better that way. Without records there's no need to checkpoint and we can wait indefinitely.fixes: #670