-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 3.11.10 uses "class" instead of "sstable_compression" for compression settings by default #8948
Comments
…sstable_compression' Cassandra 3.0 deprecated the 'sstable_compression' attribute and added 'class' as a replacement. Follow by supporting both. The SSTABLE_COMPRESSION variable is renamed to SSTABLE_COMPRESSION_DEPRECATED to detect all uses and prevent future misuse. Existing unit tests are modified to use the new name, and a test is added to ensure the old name is still supported. Fixes scylladb#8948.
@avikivity if you want me to reassign we can |
…sstable_compression' Cassandra 3.0 deprecated the 'sstable_compression' attribute and added 'class' as a replacement. Follow by supporting both. The SSTABLE_COMPRESSION variable is renamed to SSTABLE_COMPRESSION_DEPRECATED to detect all uses and prevent future misuse. To prevent old-version nodes from seeing the new name, the compression_parameters class preserves the key name when it is constructed from an options map, and emits the same key name when asked to generate an options map. Existing unit tests are modified to use the new name, and a test is added to ensure the old name is still supported. Fixes scylladb#8948.
Reopened by 331eb57 |
…sstable_compression' Cassandra 3.0 deprecated the 'sstable_compression' attribute and added 'class' as a replacement. Follow by supporting both. The SSTABLE_COMPRESSION variable is renamed to SSTABLE_COMPRESSION_DEPRECATED to detect all uses and prevent future misuse. To prevent old-version nodes from seeing the new name, the compression_parameters class preserves the key name when it is constructed from an options map, and emits the same key name when asked to generate an options map. Existing unit tests are modified to use the new name, and a test is added to ensure the old name is still supported. Fixes scylladb#8948. Closes scylladb#8949
This difference is reproduced by the translated Cassandra unit test Whereas the default setting for Cassandra is |
See more schema incompatibles here #9859 |
This is a translation of Cassandra's CQL unit test source file validation/operations/AlterTest.java into our our cql-pytest framework. This test file includes 24 tests for various types of ALTER operations (of keyspaces, tables and types). Two additional tests which required multiple data centers to test were dropped with a comment explaining why. All 24 tests pass on Cassandra, with 8 failing on Scylla reproducing one already known Scylla issue and 5 previously-unknown ones: Refs #8948: Cassandra 3.11.10 uses "class" instead of "sstable_compression" for compression settings by default Refs #9929: Cassandra added "USING TIMESTAMP" to "ALTER TABLE", we didn't. Refs #9930: Forbid re-adding static columns as regular and vice versa Refs #9935: Scylla stores un-expanded compaction class name in system tables. Refs #10036: Reject empty options while altering a keyspace Refs #10037: If there are multiple values for a key, CQL silently chooses last value Signed-off-by: Nadav Har'El <nyh@scylladb.com> Message-Id: <20220206163820.1875410-2-nyh@scylladb.com>
@agalue if you migrate just the sstables for keyspaces, does that work? |
I apologize for the delay in my response. That could work, but what I wanted is precisely avoid the need to migrate SSTables manually. I wanted to see if it is possible to stop and uninstall Cassandra, install ScyllaDB, point it to the Cassandra folder where the SSTables live, start ScyllaDB, and have it working, which is what triggered the problem I reported. That would minimize the downtime without the need for a migration, which is difficult considering the constraints we have. If that's not possible, and the only way to have it working is to migrate the SSTables before starting using Scylla (as dual-writes are not an option for us), I'll let my team know. |
Note that this issue is not just about different printing of the schema - it's also about a valid CREATE TABLE command from Cassandra (e.g., I Added two cql-pytest tests to reproduce these two aspects of this issue:
We have an old PR fixing this from @avikivity - #8949 - but as explained above it was reverted because of upgrade issues. Can we fix those and re-apply a new version of this fix? |
This patch adds some minimal tests for the "with compression = {..}" table configuration. These tests reproduce three known bugs: Refs scylladb#6442: Always print all schema parameters (including default values) Scylla doesn't return the default chunk_length_in_kb, but Cassandra does. Refs scylladb#8948: Cassandra 3.11.10 uses "class" instead of "sstable_compression" for compression settings by default Cassandra switched, long ago, the "sstable_compression" attribute's name to "class". This can break Cassandra applications that create tables (where we won't understand the "class" parameter) and applications that inquire about the configuration of existing tables. This patch adds tests for both problems. Refs scylladb#9933: ALTER TABLE with "chunk_length_kb" (compression) of 1MB caused a core dump on all nodes Our test for this issue hangs Scylla (or crashes, depending on the test environment configuration), when a huge allocation is attempted during memtable flush. So this test is marked "skip" instead of xfail. The tests included here also uncovered a new minor/insignificant bug, where Scylla allows floating point numbers as chunk_length_in_kb - this number is truncated to an integer, and allowed, unlike Cassandra or common sense. Signed-off-by: Nadav Har'El <nyh@scylladb.com>
This patch adds some minimal tests for the "with compression = {..}" table configuration. These tests reproduce three known bugs: Refs scylladb#6442: Always print all schema parameters (including default values) Scylla doesn't return the default chunk_length_in_kb, but Cassandra does. Refs scylladb#8948: Cassandra 3.11.10 uses "class" instead of "sstable_compression" for compression settings by default Cassandra switched, long ago, the "sstable_compression" attribute's name to "class". This can break Cassandra applications that create tables (where we won't understand the "class" parameter) and applications that inquire about the configuration of existing tables. This patch adds tests for both problems. Refs scylladb#9933: ALTER TABLE with "chunk_length_kb" (compression) of 1MB caused a core dump on all nodes Our test for this issue hangs Scylla (or crashes, depending on the test environment configuration), when a huge allocation is attempted during memtable flush. So this test is marked "skip" instead of xfail. The tests included here also uncovered a new minor/insignificant bug, where Scylla allows floating point numbers as chunk_length_in_kb - this number is truncated to an integer, and allowed, unlike Cassandra or common sense. Signed-off-by: Nadav Har'El <nyh@scylladb.com>
This patch adds some minimal tests for the "with compression = {..}" table configuration. These tests reproduce three known bugs: Refs #6442: Always print all schema parameters (including default values) Scylla doesn't return the default chunk_length_in_kb, but Cassandra does. Refs #8948: Cassandra 3.11.10 uses "class" instead of "sstable_compression" for compression settings by default Cassandra switched, long ago, the "sstable_compression" attribute's name to "class". This can break Cassandra applications that create tables (where we won't understand the "class" parameter) and applications that inquire about the configuration of existing tables. This patch adds tests for both problems. Refs #9933: ALTER TABLE with "chunk_length_kb" (compression) of 1MB caused a core dump on all nodes Our test for this issue hangs Scylla (or crashes, depending on the test environment configuration), when a huge allocation is attempted during memtable flush. So this test is marked "skip" instead of xfail. The tests included here also uncovered a new minor/insignificant bug, where Scylla allows floating point numbers as chunk_length_in_kb - this number is truncated to an integer, and allowed, unlike Cassandra or common sense. Signed-off-by: Nadav Har'El <nyh@scylladb.com> Closes #14261
This issue is a duplicate of #2061. One of them should be closed. The other issue is older, but this one has better explanations and also refers to a reverted patch. |
This is a translation of Cassandra's CQL unit test source file validation/operations/CreateTest.java into our cql-pytest framework. The 15 tests did not reproduce any previously-unknown bug, but did provide additional reproducers for several known issues: Refs scylladb#6442: Always print all schema parameters (including default values) Refs scylladb#8001: Documented unit "µs" not supported for assigning a duration" type. Refs scylladb#8892: Add an option for default RF for new keyspaces. Refs scylladb#8948: Cassandra 3.11.10 uses "class" instead of "sstable_compression" for compression settings by default Unfortunately, I also had to comment out - and not translate - several tests which weren't real "CQL tests" (tests that use only the CQL driver), and instead relied on Cassandra's Java implementation details: 1. Tests for CREATE TRIGGER were commented out because testing them in Cassandra requires adding a Java class for the test. We're also not likely to ever add this feature to Scylla (Refs scylladb#2205). 2. Similarly, tests for CEP-11 (Pluggable memtable implementations) used internal Java APIs instead of CQL, and it also unlikely we'll ever implement it in a way compatible with Cassandra because of its Java reliance. 3. One test for data center names used internal Cassandra Java APIs, not CQL to create mock data centers and snitches. Signed-off-by: Nadav Har'El <nyh@scylladb.com>
This is a translation of Cassandra's CQL unit test source file validation/operations/CreateTest.java into our cql-pytest framework. The 15 tests did not reproduce any previously-unknown bug, but did provide additional reproducers for several known issues: Refs scylladb#6442: Always print all schema parameters (including default values) Refs scylladb#8001: Documented unit "µs" not supported for assigning a duration" type. Refs scylladb#8892: Add an option for default RF for new keyspaces. Refs scylladb#8948: Cassandra 3.11.10 uses "class" instead of "sstable_compression" for compression settings by default Unfortunately, I also had to comment out - and not translate - several tests which weren't real "CQL tests" (tests that use only the CQL driver), and instead relied on Cassandra's Java implementation details: 1. Tests for CREATE TRIGGER were commented out because testing them in Cassandra requires adding a Java class for the test. We're also not likely to ever add this feature to Scylla (Refs scylladb#2205). 2. Similarly, tests for CEP-11 (Pluggable memtable implementations) used internal Java APIs instead of CQL, and it also unlikely we'll ever implement it in a way compatible with Cassandra because of its Java reliance. 3. One test for data center names used internal Cassandra Java APIs, not CQL to create mock data centers and snitches. Signed-off-by: Nadav Har'El <nyh@scylladb.com>
This is a translation of Cassandra's CQL unit test source file validation/operations/CreateTest.java into our cql-pytest framework. The 15 tests did not reproduce any previously-unknown bug, but did provide additional reproducers for several known issues: Refs scylladb#6442: Always print all schema parameters (including default values) Refs scylladb#8001: Documented unit "µs" not supported for assigning a duration" type. Refs scylladb#8892: Add an option for default RF for new keyspaces. Refs scylladb#8948: Cassandra 3.11.10 uses "class" instead of "sstable_compression" for compression settings by default Unfortunately, I also had to comment out - and not translate - several tests which weren't real "CQL tests" (tests that use only the CQL driver), and instead relied on Cassandra's Java implementation details: 1. Tests for CREATE TRIGGER were commented out because testing them in Cassandra requires adding a Java class for the test. We're also not likely to ever add this feature to Scylla (Refs scylladb#2205). 2. Similarly, tests for CEP-11 (Pluggable memtable implementations) used internal Java APIs instead of CQL, and it also unlikely we'll ever implement it in a way compatible with Cassandra because of its Java reliance. 3. One test for data center names used internal Cassandra Java APIs, not CQL to create mock data centers and snitches. Signed-off-by: Nadav Har'El <nyh@scylladb.com>
This is a translation of Cassandra's CQL unit test source file validation/operations/CreateTest.java into our cql-pytest framework. The 15 tests did not reproduce any previously-unknown bug, but did provide additional reproducers for several known issues: Refs scylladb#6442: Always print all schema parameters (including default values) Refs scylladb#8001: Documented unit "µs" not supported for assigning a duration" type. Refs scylladb#8892: Add an option for default RF for new keyspaces. Refs scylladb#8948: Cassandra 3.11.10 uses "class" instead of "sstable_compression" for compression settings by default Unfortunately, I also had to comment out - and not translate - several tests which weren't real "CQL tests" (tests that use only the CQL driver), and instead relied on Cassandra's Java implementation details: 1. Tests for CREATE TRIGGER were commented out because testing them in Cassandra requires adding a Java class for the test. We're also not likely to ever add this feature to Scylla (Refs scylladb#2205). 2. Similarly, tests for CEP-11 (Pluggable memtable implementations) used internal Java APIs instead of CQL, and it also unlikely we'll ever implement it in a way compatible with Cassandra because of its Java reliance. 3. One test for data center names used internal Cassandra Java APIs, not CQL to create mock data centers and snitches. Signed-off-by: Nadav Har'El <nyh@scylladb.com>
This is a translation of Cassandra's CQL unit test source file validation/operations/CreateTest.java into our cql-pytest framework. The 15 tests did not reproduce any previously-unknown bug, but did provide additional reproducers for several known issues: Refs #6442: Always print all schema parameters (including default values) Refs #8001: Documented unit "µs" not supported for assigning a duration" type. Refs #8892: Add an option for default RF for new keyspaces. Refs #8948: Cassandra 3.11.10 uses "class" instead of "sstable_compression" for compression settings by default Unfortunately, I also had to comment out - and not translate - several tests which weren't real "CQL tests" (tests that use only the CQL driver), and instead relied on Cassandra's Java implementation details: 1. Tests for CREATE TRIGGER were commented out because testing them in Cassandra requires adding a Java class for the test. We're also not likely to ever add this feature to Scylla (Refs #2205). 2. Similarly, tests for CEP-11 (Pluggable memtable implementations) used internal Java APIs instead of CQL, and it also unlikely we'll ever implement it in a way compatible with Cassandra because of its Java reliance. 3. One test for data center names used internal Cassandra Java APIs, not CQL to create mock data centers and snitches. Signed-off-by: Nadav Har'El <nyh@scylladb.com> Closes #15791
This is Scylla's bug tracker, to be used for reporting bugs only.
If you have a question about Scylla, and not a bug, please ask it in
our mailing-list at scylladb-dev@googlegroups.com or in our slack channel.
Installation details
Scylla version (or git commit hash): 4.4.3-0.20210609.bfafb8456)
Cluster size: 1 (test environment)
OS (RHEL/CentOS/Ubuntu/AWS AMI): CentOS
Hardware details (for performance issues) Delete if unneeded
Platform (physical/VM/cloud instance type/docker):
Hardware: sockets= cores= hyperthreading= memory=
Disks: (SSD/HDD, count)
I was trying to migrate to Scylla on a test environment by letting it use the same data directory as Cassandra left with all the data (i.e.,
/var/lib/cassandra
) to see if that works.After doing that, Scylla refused to start because of the following error:
I found that Cassandra deprecated
sstable_compression
(and other sibling fields), and it now usesclass
, as described here. Interestingly, Cassandra allows both, but complains whensstable_compression
is used with a warning on the logs.I'm wondering if there is a way to fix this in Scylla, to allow it to use the same Cassandra Data directory without the need of using the
sstableloader
tool to migrate the data and reduce the downtime.The text was updated successfully, but these errors were encountered: