yugabyte / debezium-connector-yugabytedb

A Debezium CDC connector for the YugabyteDB database
https://docs.yugabyte.com/stable/explore/change-data-capture/using-logical-replication/yugabytedb-connector/
Apache License 2.0
12 stars 8 forks source link

Add test for tablet split after consistent stream creation #314

Closed siddharth2411 closed 10 months ago

siddharth2411 commented 10 months ago

Testing

Added new test snapshotShouldBeCompletedOnParentIfSplitHappenedAfterStreamCreation to test the following scenario between tablet split & consistent snapshot:

  1. Insert 10 rows for table t1.
  2. Consistent snapshot Stream created
  3. Split tablet
  4. Insert 5 more rows
  5. Deploy connector (GetTabletListToPollForCDC should receive only parent tablet)
  6. Assert 10 rows received in snapshot & 5 rows in streaming

Following things are verified:

  1. Snapshot takes place on the parent tablet
  2. Any DMLs performed after the split are not part of snapshot records.