Commit b6b0915
committed
[BACKPORT 2024.1][yugabyte#23278] CDCSDK: Handle non-eligible tables cleanup with drop table while loading CDC stream
Summary:
**Backport description:**
Minor merge conflicts in test's base class because of missing flag.
**Original description:**
Original commit: 64e1bf8 / D37053
When a table present under a CDC stream is dropped, it is removed from the CDC stream metadata by a background thread.
Suppose before the background thread could cleanup, there was a master restart or a master leadership change. On either of these scenarios, while loading the CDC streams, we check all tables present in the CDC stream metadata for ineligibility. Table schema is one of the objects that is scanned while checking for ineligibility. To get the table schema, we fetch the `TableInfo` object from master. This step was leading to a master crash as we receive a nullptr while fetching TableInfo since the table has been dropped.
Jira: DB-12205
Test Plan: ./yb_build.sh --cxx-test cdcsdk_ysql-test --gtest_filter CDCSDKYsqlTest.TestNonEligibleTablesCleanupWhenDropTableCleanupIsDisabled
Reviewers: asrinivasan, stiwary, skumar
Reviewed By: stiwary
Subscribers: ybase
Tags: #jenkins-ready
Differential Revision: https://phorge.dev.yugabyte.com/D370901 parent 6e7726e commit b6b0915
File tree
3 files changed
+88
-21
lines changed- src/yb
- integration-tests
- master
3 files changed
+88
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9298 | 9298 | | |
9299 | 9299 | | |
9300 | 9300 | | |
| 9301 | + | |
| 9302 | + | |
| 9303 | + | |
| 9304 | + | |
| 9305 | + | |
| 9306 | + | |
| 9307 | + | |
| 9308 | + | |
| 9309 | + | |
| 9310 | + | |
| 9311 | + | |
| 9312 | + | |
| 9313 | + | |
| 9314 | + | |
| 9315 | + | |
| 9316 | + | |
| 9317 | + | |
| 9318 | + | |
| 9319 | + | |
| 9320 | + | |
| 9321 | + | |
| 9322 | + | |
| 9323 | + | |
| 9324 | + | |
| 9325 | + | |
| 9326 | + | |
| 9327 | + | |
| 9328 | + | |
| 9329 | + | |
| 9330 | + | |
| 9331 | + | |
| 9332 | + | |
| 9333 | + | |
| 9334 | + | |
| 9335 | + | |
| 9336 | + | |
| 9337 | + | |
| 9338 | + | |
| 9339 | + | |
| 9340 | + | |
| 9341 | + | |
| 9342 | + | |
| 9343 | + | |
| 9344 | + | |
| 9345 | + | |
| 9346 | + | |
| 9347 | + | |
| 9348 | + | |
| 9349 | + | |
| 9350 | + | |
| 9351 | + | |
| 9352 | + | |
| 9353 | + | |
| 9354 | + | |
| 9355 | + | |
| 9356 | + | |
9301 | 9357 | | |
9302 | 9358 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| 125 | + | |
| 126 | + | |
125 | 127 | | |
126 | 128 | | |
127 | 129 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
163 | 166 | | |
164 | 167 | | |
165 | 168 | | |
| |||
1917 | 1920 | | |
1918 | 1921 | | |
1919 | 1922 | | |
1920 | | - | |
1921 | | - | |
1922 | | - | |
1923 | | - | |
1924 | | - | |
1925 | | - | |
1926 | | - | |
1927 | | - | |
| 1923 | + | |
| 1924 | + | |
| 1925 | + | |
| 1926 | + | |
| 1927 | + | |
| 1928 | + | |
| 1929 | + | |
| 1930 | + | |
| 1931 | + | |
1928 | 1932 | | |
1929 | | - | |
1930 | | - | |
1931 | | - | |
1932 | | - | |
1933 | | - | |
1934 | | - | |
1935 | | - | |
| 1933 | + | |
| 1934 | + | |
| 1935 | + | |
| 1936 | + | |
| 1937 | + | |
| 1938 | + | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
| 1944 | + | |
| 1945 | + | |
1936 | 1946 | | |
1937 | | - | |
1938 | | - | |
1939 | | - | |
1940 | | - | |
| 1947 | + | |
| 1948 | + | |
1941 | 1949 | | |
1942 | 1950 | | |
1943 | 1951 | | |
| |||
6871 | 6879 | | |
6872 | 6880 | | |
6873 | 6881 | | |
6874 | | - | |
6875 | | - | |
| 6882 | + | |
| 6883 | + | |
| 6884 | + | |
6876 | 6885 | | |
6877 | 6886 | | |
6878 | 6887 | | |
| |||
0 commit comments