mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-29 12:47:02 +00:00
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 #8948. Closes #8949
25 lines
900 B
SQL
25 lines
900 B
SQL
--
|
|
--
|
|
-- Copyright (C) 2021-present ScyllaDB
|
|
--
|
|
-- Modified by ScyllaDB
|
|
--
|
|
-- This file is part of Scylla.
|
|
--
|
|
-- Scylla is free software: you can redistribute it and/or modify
|
|
-- it under the terms of the GNU Affero General Public License as published by
|
|
-- the Free Software Foundation, either version 3 of the License, or
|
|
-- (at your option) any later version.
|
|
--
|
|
-- Scylla is distributed in the hope that it will be useful,
|
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
-- GNU General Public License for more details.
|
|
--
|
|
-- You should have received a copy of the GNU General Public License
|
|
-- along with Scylla. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
-- test_sstable_compression_deprecated_attribute
|
|
CREATE TABLE t (id int primary key) WITH compression = {'sstable_compression': 'LZ4Compressor'};
|
|
--
|