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

Schema change support #45

Open
avelanarius opened this issue May 6, 2021 · 0 comments
Open

Schema change support #45

avelanarius opened this issue May 6, 2021 · 0 comments
Labels
base scylla-cdc-base package

Comments

@avelanarius
Copy link
Contributor

Currently, the library handles schema change incorrectly.

Moreover, Driver3SchemaBuilder could be prone to race condition issues:

as it is not specified that this read base table schema will be fresh and the same as returned by the queries.

@avelanarius avelanarius added the base scylla-cdc-base package label May 6, 2021
avelanarius added a commit to avelanarius/scylla-cdc-java that referenced this issue May 25, 2021
This commit is essentially a complete rework of Driver3SchemaBuilder.
This rework was made to fix potential problems with previous
Driver3SchemaBuilder, which could potentially return incorrect schema
when base table schema or CDC log schema returned by the driver was 
stale.

The new Driver3SchemaBuilder uses the schema from both tables, but
relies as much as possible on CDC log schema. The returned schema
is always consistent with CDC log schema (or an exception is thrown).

Refs scylladb#45.
Refs scylladb/scylladb#7824.
avelanarius added a commit to avelanarius/scylla-cdc-java that referenced this issue May 27, 2021
This commit is essentially a complete rework of Driver3SchemaBuilder.
This rework was made to fix potential problems with previous
Driver3SchemaBuilder, which could potentially return incorrect schema
when base table schema or CDC log schema returned by the driver was
stale.

The new Driver3SchemaFactory (it was renamed) uses the schema from both
tables, but relies as much as possible on CDC log schema. The returned
schema is always consistent with CDC log schema (or an exception is thrown).

Refs scylladb#45.
Refs scylladb/scylladb#7824.
avelanarius added a commit to avelanarius/scylla-cdc-java that referenced this issue Dec 10, 2021
This commit is essentially a complete rework of Driver3SchemaBuilder.
This rework was made to fix potential problems with previous
Driver3SchemaBuilder, which could potentially return incorrect schema
when base table schema or CDC log schema returned by the driver was
stale.

The new Driver3SchemaFactory (it was renamed) uses the schema from both
tables, but relies as much as possible on CDC log schema. The returned
schema is always consistent with CDC log schema (or an exception is thrown).

Refs scylladb#45.
Refs scylladb/scylladb#7824.
avelanarius added a commit that referenced this issue Dec 10, 2021
This commit is essentially a complete rework of Driver3SchemaBuilder.
This rework was made to fix potential problems with previous
Driver3SchemaBuilder, which could potentially return incorrect schema
when base table schema or CDC log schema returned by the driver was
stale.

The new Driver3SchemaFactory (it was renamed) uses the schema from both
tables, but relies as much as possible on CDC log schema. The returned
schema is always consistent with CDC log schema (or an exception is thrown).

Refs #45.
Refs scylladb/scylladb#7824.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
base scylla-cdc-base package
Projects
None yet
Development

No branches or pull requests

1 participant