scylla-tools-java
scylla-tools-java copied to clipboard
Enable use of 'unset' values in prepared statements by default
We have support for the use of 'unset' values to reduce the number of prepared statements as of commit b432a08dad2816273184cab54c5ccbef4e7e14dd. However, user needs to explicitly enable that with the -u command line option, which they will easily forget to do.
We should make this enabled by default just like we do for prepared statements and batching since commit b382110eb962d2ff7d3b32d2c0fa626c08a18f25. @haaawk did want us to check the performance impact of 'unset' before we do that, though.
It would probably be good as the default option should be the one that performs better. I won't insist though :)
@haaawk No, I think it's a reasonable requirement before defaulting to the new option.
@penberg @elcallio I would wait with enabling this by default. I was testing sstable loader with data generated by cassandra stress. Default schema is:
CREATE KEYSPACE keyspace1 WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'} AND durable_writes = true;
CREATE TABLE keyspace1.counter1 ( key blob, column1 text, "C0" counter static, "C1" counter static, "C2" counter static, "C3" counter static, "C4" counter static, value counter, PRIMARY KEY (key, column1) ) WITH COMPACT STORAGE AND CLUSTERING ORDER BY (column1 ASC) AND bloom_filter_fp_chance = 0.01 AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'} AND comment = '' AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'} AND compression = {'enabled': 'false'} AND crc_check_chance = 1.0 AND dclocal_read_repair_chance = 0.1 AND default_time_to_live = 0 AND gc_grace_seconds = 864000 AND max_index_interval = 2048 AND memtable_flush_period_in_ms = 0 AND min_index_interval = 128 AND read_repair_chance = 0.0 AND speculative_retry = '99PERCENTILE';
CREATE TABLE keyspace1.standard1 ( key blob PRIMARY KEY, "C0" blob, "C1" blob, "C2" blob, "C3" blob, "C4" blob ) WITH COMPACT STORAGE AND bloom_filter_fp_chance = 0.01 AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'} AND comment = '' AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'} AND compression = {'enabled': 'false'} AND crc_check_chance = 1.0 AND dclocal_read_repair_chance = 0.1 AND default_time_to_live = 0 AND gc_grace_seconds = 864000 AND max_index_interval = 2048 AND memtable_flush_period_in_ms = 0 AND min_index_interval = 128 AND read_repair_chance = 0.0 AND speculative_retry = '99PERCENTILE';
and running sstable loader like this: ./bin/sstableloader -u -d 127.0.0.1 /home/haaawk/.ccm/loader-1/node1/data0/keyspace1/standard1-c17511f0bb2111e8ac3f47eff2803657/
generates lots of errors:
com.datastax.driver.core.exceptions.InvalidQueryException: Unknown identifier column1