-
Notifications
You must be signed in to change notification settings - Fork 8
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
[yugabyte/yugabyte-db#17854] Bug while transition from snapshot to streaming #236
Merged
vaibhav-yb
merged 18 commits into
yugabyte:main
from
vaibhav-yb:add-snapshot-done-key-call
Jul 3, 2023
Merged
[yugabyte/yugabyte-db#17854] Bug while transition from snapshot to streaming #236
vaibhav-yb
merged 18 commits into
yugabyte:main
from
vaibhav-yb:add-snapshot-done-key-call
Jul 3, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vaibhav-yb
commented
Jun 27, 2023
.pollDelay(Duration.ofSeconds(10)) | ||
.atMost(Duration.ofSeconds(20)) | ||
.pollDelay(Duration.ofSeconds(15)) | ||
.atMost(Duration.ofSeconds(65)) |
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.
Because of some infra issues in some of the test runs, sometimes the connector is not able to come up within 20 seconds. Increasing the timeout to avoid that.
vaibhav-yb
requested review from
suranjan and
vrajat
and removed request for
suranjan
June 28, 2023 05:27
vrajat
reviewed
Jun 30, 2023
src/main/java/io/debezium/connector/yugabytedb/YugabyteDBStreamingChangeEventSource.java
Outdated
Show resolved
Hide resolved
src/main/java/io/debezium/connector/yugabytedb/YugabyteDBSnapshotChangeEventSource.java
Outdated
Show resolved
Hide resolved
vrajat
approved these changes
Jul 3, 2023
This was referenced Jul 3, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
It was found out that there is a flow where we set the
tabletSourceInfo
to0.0
- while snapshotting while streaming snapshot records. This0.0
came because we do not send anyOpId
with snapshot records but while accessing the records, when we are callinggetTerm
orgetIndex
we are getting the default value0.0
which is then being used in commit callback as0.0
The previous flow also resulted in the error of the form:
Solution
A part of the solution was to decouple the offset storage objects which was implemented by #233 - after this, there were other fixes required to resolve issues of invalid checkpoints which are mentioned below and are a part of this PR.
GetChanges
call withsnapshot_done_key
as the key to mark snapshot completed on service.fromLsn
object upon calling the methodYugabyteDBOffsetContext#initSourceInfo
Service diff
https://phorge.dev.yugabyte.com/D26336
Test plan
The test
YugabyteDBSnapshotTest#snapshotColocatedNonColocatedThenStream
started to fail when we started running tests with explicit checkpointing with our frequent Jenkins runs. The test passes with the changes included in the PR.This PR also closes yugabyte/yugabyte-db#17854