Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge 'treewide: add uuid_sstable_identifier_enabled support' from Ke…
…fu Chai this series adds an option named "uuid_sstable_identifier_enabled", and the related cluster feature bit, which is set once all nodes in this cluster set this option to "true". and the sstable subsystem will start using timeuuid instead plain integer for the identifier of sstables. timeuuid should be a better choice for identifiers as we don't need to worry about the id conflicts anymore. but we still have quite a few tests using static sstables with integer in their names, these tests are not changed in this series. we will create some tests to exercise the sstable subsystem with this option set. a very simple inter-op test with Cassandra 4.1.1 was also performed to verify that the generated sstables can be read by the Cassandra: 1. start scylla, and connect it with cqlsh, run following commands, and stop it ``` cqlsh> CREATE KEYSPACE ks WITH REPLICATION = { 'class' : 'SimpleStrategy','replication_factor':1} ; cqlsh> CREATE TABLE ks.cf ( name text primary key, value text ); cqlsh> INSERT INTO ks.cf (name, value) VALUES ('1', 'one'); cqlsh> SELECT * FROM ks.cf; ``` 2. enable Cassandra's `uuid_sstable_identifiers_enabled`, and start Cassandra 4.1.1, and connect it with cqlsh, run following commands, and stop it ``` cqlsh> CREATE KEYSPACE ks WITH REPLICATION = { 'class' : 'SimpleStrategy','replication_factor':1} ; cqlsh> CREATE TABLE ks.cf ( name text primary key, value text ); cqlsh> INSERT INTO ks.cf (name, value) VALUES ('1', 'one'); cqlsh> SELECT * FROM ks.cf; ``` 2. move away the sstables generated by Cassandra, and replace it with the sstables generated by scylladb: ```console $ mv ~/cassandra/data/data/ks/cf-b29d23a009d911eeb5fed163c4d0af49 /tmp $ mv ~/scylla/ks/cf-db47a12009d611eea6b8b179df3a2d5d ~/cassandra/data/data/ks/cf-b29d23a009d911eeb5fed163c4d0af49 ``` 3. start Cassandra 4.1.1 again, and connect it with cqlsh, run following commands ``` cqlsh> SELECT * FROM ks.cf; name | value ------+------- 1 | one ``` Fixes #10459 Closes #13932 * github.com:scylladb/scylladb: replica,sstable: introduce invalid generation id sstables, replica: pass uuid_sstable_identifiers to generation generator gms/feature_service: introduce UUID_SSTABLE_IDENTIFIERS cluster feature db: config: add uuid_sstable_identifiers_enabled option sstables, replica: support UUID in generation_type
- Loading branch information
Showing
19 changed files
with
275 additions
and
66 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.