diff --git a/CHANGES.txt b/CHANGES.txt index ba4b4ff6bd..7fd542a969 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -18,6 +18,8 @@ * Optimise NativeCell comparisons (CASSANDRA-6755) 2.1.0 + * Remove left-over populate_io_cache_on_flush and replicate_on_write + uses (CASSANDRA-7493) * (Windows) handle spaces in path names (CASSANDRA-7451) * Ensure writes have completed after dropping a table, before recycling commit log segments (CASSANDRA-7437) diff --git a/examples/client_only/conf/cassandra.yaml b/examples/client_only/conf/cassandra.yaml index f372dbfc21..a6b3b431b4 100644 --- a/examples/client_only/conf/cassandra.yaml +++ b/examples/client_only/conf/cassandra.yaml @@ -49,11 +49,6 @@ hinted_handoff_throttle_in_kb: 1024 # cross-dc handoff tends to be slower max_hints_delivery_threads: 2 -# The following setting populates the page cache on memtable flush and compaction -# WARNING: Enable this setting only when the whole node's data fits in memory. -# Defaults to: false -# populate_io_cache_on_flush: false - # authentication backend, implementing IAuthenticator; used to identify users authenticator: org.apache.cassandra.auth.AllowAllAuthenticator diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py index a99e8e6fbb..3d489d30e8 100644 --- a/pylib/cqlshlib/cql3handling.py +++ b/pylib/cqlshlib/cql3handling.py @@ -64,7 +64,6 @@ class Cql3ParsingRuleSet(CqlParsingRuleSet): ('min_index_interval', None), ('max_index_interval', None), ('read_repair_chance', None), - ('populate_io_cache_on_flush', None), ('default_time_to_live', None), ('speculative_retry', None), ('memtable_flush_period_in_ms', None), @@ -435,8 +434,6 @@ def cf_prop_val_completer(ctxt, cass): if this_opt in ('read_repair_chance', 'bloom_filter_fp_chance', 'dclocal_read_repair_chance'): return [Hint('')] - if this_opt in ('replicate_on_write', 'populate_io_cache_on_flush'): - return ["'yes'", "'no'"] if this_opt in ('min_compaction_threshold', 'max_compaction_threshold', 'gc_grace_seconds', 'min_index_interval', 'max_index_interval'): return [Hint('')] diff --git a/src/java/org/apache/cassandra/cli/CliClient.java b/src/java/org/apache/cassandra/cli/CliClient.java index ab6a2219ed..c6b3bcdda5 100644 --- a/src/java/org/apache/cassandra/cli/CliClient.java +++ b/src/java/org/apache/cassandra/cli/CliClient.java @@ -1816,11 +1816,9 @@ public class CliClient writeAttr(output, false, "read_repair_chance", cfDef.read_repair_chance); writeAttr(output, false, "dclocal_read_repair_chance", cfDef.dclocal_read_repair_chance); - writeAttr(output, false, "populate_io_cache_on_flush", cfDef.populate_io_cache_on_flush); writeAttr(output, false, "gc_grace", cfDef.gc_grace_seconds); writeAttr(output, false, "min_compaction_threshold", cfDef.min_compaction_threshold); writeAttr(output, false, "max_compaction_threshold", cfDef.max_compaction_threshold); - writeAttr(output, false, "replicate_on_write", cfDef.replicate_on_write); writeAttr(output, false, "compaction_strategy", cfDef.compaction_strategy); writeAttr(output, false, "caching", cfDef.caching); writeAttr(output, false, "cells_per_row_to_cache", cfDef.cells_per_row_to_cache); @@ -2189,8 +2187,6 @@ public class CliClient sessionState.out.printf(" Compaction min/max thresholds: %s/%s%n", cf_def.min_compaction_threshold, cf_def.max_compaction_threshold); sessionState.out.printf(" Read repair chance: %s%n", cf_def.read_repair_chance); sessionState.out.printf(" DC Local Read repair chance: %s%n", cf_def.dclocal_read_repair_chance); - sessionState.out.printf(" Populate IO Cache on flush: %b%n", cf_def.populate_io_cache_on_flush); - sessionState.out.printf(" Replicate on write: %s%n", cf_def.replicate_on_write); sessionState.out.printf(" Caching: %s%n", cf_def.caching); sessionState.out.printf(" Default time to live: %s%n", cf_def.default_time_to_live); sessionState.out.printf(" Bloom Filter FP chance: %s%n", cf_def.isSetBloom_filter_fp_chance() ? cf_def.bloom_filter_fp_chance : "default"); diff --git a/src/java/org/apache/cassandra/config/CFMetaData.java b/src/java/org/apache/cassandra/config/CFMetaData.java index 15219ebd14..7188ee18d1 100644 --- a/src/java/org/apache/cassandra/config/CFMetaData.java +++ b/src/java/org/apache/cassandra/config/CFMetaData.java @@ -177,7 +177,6 @@ public final class CFMetaData + "column_aliases text," + "compaction_strategy_options text," + "speculative_retry text," - + "populate_io_cache_on_flush boolean," + "index_interval int," + "min_index_interval int," + "max_index_interval int," diff --git a/src/java/org/apache/cassandra/cql3/statements/CFPropDefs.java b/src/java/org/apache/cassandra/cql3/statements/CFPropDefs.java index 486fc9abe7..aee86a818f 100644 --- a/src/java/org/apache/cassandra/cql3/statements/CFPropDefs.java +++ b/src/java/org/apache/cassandra/cql3/statements/CFPropDefs.java @@ -43,7 +43,6 @@ public class CFPropDefs extends PropertyDefinitions public static final String KW_MIN_INDEX_INTERVAL = "min_index_interval"; public static final String KW_MAX_INDEX_INTERVAL = "max_index_interval"; public static final String KW_SPECULATIVE_RETRY = "speculative_retry"; - public static final String KW_POPULATE_IO_CACHE_ON_FLUSH = "populate_io_cache_on_flush"; public static final String KW_BF_FP_CHANCE = "bloom_filter_fp_chance"; public static final String KW_MEMTABLE_FLUSH_PERIOD = "memtable_flush_period_in_ms"; @@ -66,7 +65,6 @@ public class CFPropDefs extends PropertyDefinitions keywords.add(KW_MIN_INDEX_INTERVAL); keywords.add(KW_MAX_INDEX_INTERVAL); keywords.add(KW_SPECULATIVE_RETRY); - keywords.add(KW_POPULATE_IO_CACHE_ON_FLUSH); keywords.add(KW_BF_FP_CHANCE); keywords.add(KW_COMPACTION); keywords.add(KW_COMPRESSION); @@ -74,6 +72,7 @@ public class CFPropDefs extends PropertyDefinitions obsoleteKeywords.add("index_interval"); obsoleteKeywords.add("replicate_on_write"); + obsoleteKeywords.add("populate_io_cache_on_flush"); } private Class compactionStrategyClass = null; diff --git a/src/resources/org/apache/cassandra/cli/CliHelp.yaml b/src/resources/org/apache/cassandra/cli/CliHelp.yaml index 3c167bcebe..cc838f8301 100644 --- a/src/resources/org/apache/cassandra/cli/CliHelp.yaml +++ b/src/resources/org/apache/cassandra/cli/CliHelp.yaml @@ -541,12 +541,6 @@ commands: boundaries are the number of tables Cassandra attempts to merge together at once. - - replicate_on_write: Replicate every counter update from the leader to the - follower replicas. Accepts the values true and false. - - - populate_io_cache_on_flush: Populates the page cache on memtable flush - and compaction. Accepts the values true and false. - - compression_options: Options related to compression. Options have the form {key:value}. The main recognized options are: @@ -838,12 +832,6 @@ commands: boundaries are the number of tables Cassandra attempts to merge together at once. - - replicate_on_write: Replicate every counter update from the leader to the - follower replicas. Accepts the values true and false. - - - populate_io_cache_on_flush: Populates the page cache on memtable flush - and compaction. Accepts the values true and false. - - compression_options: Options related to compression. Options have the form {key:value}. The main recognized options are: diff --git a/tools/stress/src/org/apache/cassandra/stress/settings/Legacy.java b/tools/stress/src/org/apache/cassandra/stress/settings/Legacy.java index eb04290d1d..70693afbe5 100644 --- a/tools/stress/src/org/apache/cassandra/stress/settings/Legacy.java +++ b/tools/stress/src/org/apache/cassandra/stress/settings/Legacy.java @@ -67,7 +67,6 @@ public class Legacy implements Serializable availableOptions.addOption("x", "create-index", true, "Type of index to create on needed column families (KEYS)"); availableOptions.addOption("R", "replication-strategy", true, "Replication strategy to use (only on insert if keyspace does not exist), default:org.apache.cassandra.locator.SimpleStrategy"); availableOptions.addOption("O", "strategy-properties", true, "Replication strategy properties in the following format :,:,..."); - availableOptions.addOption("W", "no-replicate-on-write",false, "Set replicate_on_write to false for counters. Only counter add with CL=ONE will work"); availableOptions.addOption("V", "average-size-values", false, "Generate column values of average rather than specific size"); availableOptions.addOption("T", "send-to", true, "Send this as a request to the stress daemon at specified address."); availableOptions.addOption("I", "compression", true, "Specify the compression to use for sstable, default:no compression"); @@ -237,9 +236,6 @@ public class Legacy implements Serializable else r.add("-mode", "thrift"); - if (cmd.hasOption("W")) - r.add("-schema", "no-replicate-on-write"); - if (cmd.hasOption("I")) r.add("-schema", "compression=" + cmd.getOptionValue("I")); diff --git a/tools/stress/src/org/apache/cassandra/stress/settings/SettingsSchema.java b/tools/stress/src/org/apache/cassandra/stress/settings/SettingsSchema.java index 33af446a25..ffafb67b3f 100644 --- a/tools/stress/src/org/apache/cassandra/stress/settings/SettingsSchema.java +++ b/tools/stress/src/org/apache/cassandra/stress/settings/SettingsSchema.java @@ -1,4 +1,3 @@ -package org.apache.cassandra.stress.settings; /* * * Licensed to the Apache Software Foundation (ASF) under one @@ -19,14 +18,12 @@ package org.apache.cassandra.stress.settings; * under the License. * */ - +package org.apache.cassandra.stress.settings; import java.io.Serializable; import java.nio.ByteBuffer; import java.util.*; -import org.apache.cassandra.config.CFMetaData; -import org.apache.cassandra.exceptions.ConfigurationException; import org.apache.cassandra.thrift.*; import org.apache.cassandra.utils.ByteBufferUtil; @@ -40,7 +37,6 @@ public class SettingsSchema implements Serializable private final Map replicationStrategyOptions; private final IndexType indexType; - private final boolean replicateOnWrite; private final String compression; private final String compactionStrategy; private final Map compactionStrategyOptions; @@ -48,7 +44,6 @@ public class SettingsSchema implements Serializable public SettingsSchema(Options options) { - replicateOnWrite = !options.noReplicateOnWrite.setByUser(); replicationStrategy = options.replication.getStrategy(); replicationStrategyOptions = options.replication.getOptions(); if (options.index.setByUser()) @@ -112,14 +107,12 @@ public class SettingsSchema implements Serializable CfDef counterCfDef = new CfDef(keyspace, "Counter1") .setComparator_type(comparator) .setDefault_validation_class("CounterColumnType") - .setReplicate_on_write(replicateOnWrite) .setCompression_options(compressionOptions); // column family with counter super columns CfDef counterSuperCfDef = new CfDef(keyspace, "SuperCounter1") .setComparator_type(comparator) .setDefault_validation_class("CounterColumnType") - .setReplicate_on_write(replicateOnWrite) .setColumn_type("Super") .setCompression_options(compressionOptions); @@ -200,13 +193,12 @@ public class SettingsSchema implements Serializable final OptionCompaction compaction = new OptionCompaction(); final OptionSimple index = new OptionSimple("index=", "KEYS|CUSTOM|COMPOSITES", null, "Type of index to create on needed column families (KEYS)", false); final OptionSimple keyspace = new OptionSimple("keyspace=", ".*", "Keyspace1", "The keyspace name to use", false); - final OptionSimple noReplicateOnWrite = new OptionSimple("no-replicate-on-write", "", null, "Set replicate_on_write to false for counters. Only counter add with CL=ONE will work", false); final OptionSimple compression = new OptionSimple("compression=", ".*", null, "Specify the compression to use for sstable, default:no compression", false); @Override public List options() { - return Arrays.asList(replication, index, keyspace, compaction, noReplicateOnWrite, compression); + return Arrays.asList(replication, index, keyspace, compaction, compression); } }