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

CASSANDRA-18317 Properly synchronize CQLSSTableWriter#build on the Schema.instance object #2208

Closed

Conversation

frankgh
Copy link
Contributor

@frankgh frankgh commented Mar 9, 2023

In this commit the org.apache.cassandra.io.sstable.CQLSSTableWriter#build method synchronizes on the
Schema.instance object (instead of the CQLSSTableWriter.class) to prevent concurrent schema operations
to fail when the offline tools also updates the schema.

For example, a table creation operation, which modifies the keyspace tables metadata, might end up
missing the update when a concurrent call to the CQLSSTableWriter#build method is accessing the
singleton Schema instance.

Cassandra 4.0 changes

…hema.instance object

In this commit the `org.apache.cassandra.io.sstable.CQLSSTableWriter#build` method synchronizes on the
`Schema.instance` object (instead of the `CQLSSTableWriter.class`) to prevent concurrent schema operations
to fail when the offline tools also updates the schema.

For example, a table creation operation, which modifies the keyspace tables metadata, might end up
missing the update when a concurrent call to the `CQLSSTableWriter#build` method is accessing the
singleton Schema instance.
@frankgh
Copy link
Contributor Author

frankgh commented Oct 27, 2023

Closed via 26c374d

@frankgh frankgh closed this Oct 27, 2023
@frankgh frankgh deleted the CASSANDRA-18317-cassandra-4.0 branch October 27, 2023 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant