Skip to content
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#18075] Send snapshot_done_key before starting streaming #239

Merged
merged 3 commits into from
Jul 4, 2023

Conversation

vaibhav-yb
Copy link
Collaborator

@vaibhav-yb vaibhav-yb commented Jul 4, 2023

Problem

Consider the scenario where we have 3 colocated tables, we start streaming for 2 of them.

  1. We have 3 colocated tables
  2. Start streaming with 2 of them in the include list
  3. Stop the connector
  4. Modify the configuration to include all 3 tables in the list now

In the above case, if there is an insert between step 3 and step 4, there will be data loss for colocated tables.

Solution

This PR adds the logic for the connector to send snapshot_done_key before the beginning of streaming in snapshot.mode:never so that the service knows the connector will not request snapshot in that case.

Test plan

Modify an existing test case YugabyteDBColocatedTablesTest#shouldWorkAfterAddingTableAfterRestart to accomodate the scenario mentioned in the problem.

This PR closes yugabyte/yugabyte-db#18075

@vaibhav-yb vaibhav-yb self-assigned this Jul 4, 2023
@vaibhav-yb vaibhav-yb requested a review from suranjan July 4, 2023 13:54
@vaibhav-yb vaibhav-yb changed the title [WIP] Fix for regression in streaming changes for colocated tables [yugabyte/yugabyte-db#18075] Fix for regression in streaming changes for colocated tables Jul 4, 2023
@vaibhav-yb vaibhav-yb changed the title [yugabyte/yugabyte-db#18075] Fix for regression in streaming changes for colocated tables [yugabyte/yugabyte-db#18075] Send snapshot_done_key before starting streaming Jul 4, 2023
@vaibhav-yb vaibhav-yb merged commit 5fa3811 into main Jul 4, 2023
@vaibhav-yb vaibhav-yb deleted the colocated-tables-regression branch August 18, 2023 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CDCSDK] DBZ: Connector should send snapshot_done_key before starting streaming
2 participants