test: Add integration tests for CDC table metadata#743
Open
dkropachev wants to merge 1 commit intomasterfrom
Open
test: Add integration tests for CDC table metadata#743dkropachev wants to merge 1 commit intomasterfrom
dkropachev wants to merge 1 commit intomasterfrom
Conversation
Add comprehensive integration tests for ScyllaDB CDC (Change Data Capture) table metadata handling. Tests cover: - CDC log table creation when base table has CDC enabled - Table creation without CDC (negative case) - Enabling/disabling CDC via ALTER TABLE - CDC options: preimage, postimage, TTL - Altering CDC options - CDC log table column structure (cdc$stream_id, cdc$time, cdc$operation) - Base table drop removes CDC log table - Cache staleness after drop (schema event propagation) - scyllaIsCdcTable detection - Cold cache discovery of CDC log tables with event logging The cold cache test (cdc_log_table_discoverable_without_cache) subscribes to schema change events and logs them, proving that ScyllaDB sends CREATED events for CDC log tables. It uses retry with backoff to handle the event debouncer's 1s processing window. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or 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
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.
Summary
scylla_cdc_test.gocdc_log_table_discoverable_without_cachetest subscribes to schema change events and proves ScyllaDB does sendCREATEDevents for CDC log tables — the issue is a race with the 1s event debouncer windowTest scenarios
create_table_with_cdc_enabledcreate_table_without_cdcenable_cdc_via_alter_tabledisable_cdc_via_alter_tablecdc_with_preimage_and_ttlalter_cdc_optionscdc_log_table_discoverable_without_cachecdc_log_table_has_expected_columnsdrop_base_table_removes_cdc_logdrop_base_table_cdc_log_not_stale_in_cachescyllaIsCdcTable_detectionscyllaIsCdcTable()correctly identifies CDC vs base tablescdc_with_postimageKey finding
The
cdc_log_table_discoverable_without_cachetest demonstrates that:GetTableis called immediately afterCREATE TABLETest plan
make scylla-start)CDC is a ScyllaDB-specific feature)🤖 Generated with Claude Code