Commit 7f3bc9a
Improve continuous backup detection for impl table operations
The previous approach applied version synchronization to ALL impl table
CDC operations, which broke normal CDC stream creation on index tables.
The issue: Normal CDC stream creation (with initial scan) on index tables
was triggering version synchronization, syncing impl table to a parent
table version that hadn't been propagated to datashard yet, causing:
"Schema version mismatch: got# 1, expected# 2"
Solution: Enhanced continuous backup detection for impl tables:
1. Check current operation's CDC stream name (existing logic)
2. ALSO check if parent table has ANY CDC streams with
"_continuousBackupImpl" suffix (new logic)
This ensures:
- Continuous backup operations ARE detected (even sub-operations
without explicit stream name matching)
- Normal CDC operations are NOT detected (no false positives)
- Version synchronization only applies to continuous backup
Example:
- Parent table has "20250101000000Z_continuousBackupImpl" stream
- Impl table CDC operation checks parent's children
- Finds the continuous backup stream → triggers synchronization
- Normal CDC stream "my_cdc_stream" on index table → no sync1 parent cab7526 commit 7f3bc9a
File tree
1 file changed
+27
-8
lines changed- ydb/core/tx/schemeshard
1 file changed
+27
-8
lines changedLines changed: 27 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
160 | | - | |
161 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
162 | 183 | | |
163 | 184 | | |
164 | 185 | | |
165 | 186 | | |
166 | | - | |
167 | | - | |
| 187 | + | |
168 | 188 | | |
169 | 189 | | |
170 | 190 | | |
| |||
174 | 194 | | |
175 | 195 | | |
176 | 196 | | |
177 | | - | |
178 | 197 | | |
179 | 198 | | |
180 | | - | |
| 199 | + | |
181 | 200 | | |
182 | 201 | | |
183 | 202 | | |
| |||
189 | 208 | | |
190 | 209 | | |
191 | 210 | | |
192 | | - | |
193 | 211 | | |
194 | 212 | | |
195 | 213 | | |
| |||
216 | 234 | | |
217 | 235 | | |
218 | 236 | | |
| 237 | + | |
219 | 238 | | |
220 | 239 | | |
221 | 240 | | |
| |||
0 commit comments