diff --git a/src/java/org/apache/cassandra/db/compaction/UnifiedCompactionContainer.java b/src/java/org/apache/cassandra/db/compaction/UnifiedCompactionContainer.java index 079722fbf3ce..0b15008a1fa3 100644 --- a/src/java/org/apache/cassandra/db/compaction/UnifiedCompactionContainer.java +++ b/src/java/org/apache/cassandra/db/compaction/UnifiedCompactionContainer.java @@ -50,7 +50,6 @@ public class UnifiedCompactionContainer implements CompactionStrategyContainer private final CompactionParams metadataParams; private final UnifiedCompactionStrategy strategy; private final boolean enableAutoCompaction; - private final boolean hasVector; AtomicBoolean enabled; @@ -67,7 +66,6 @@ public class UnifiedCompactionContainer implements CompactionStrategyContainer this.strategy = new UnifiedCompactionStrategy(factory, backgroundCompactions, params.options()); this.enabled = new AtomicBoolean(enabled); this.enableAutoCompaction = enableAutoCompaction; - this.hasVector = strategy.getController().hasVectorType(); factory.getCompactionLogger().strategyCreated(this.strategy); @@ -144,14 +142,6 @@ public CompactionStrategyContainer reload(@Nonnull CompactionStrategyContainer p return create(previous, factory, compactionParams, reason, enableAutoCompaction); } - @Override - public boolean shouldReload(CompactionParams params, ReloadReason reason) - { - return reason != CompactionStrategyContainer.ReloadReason.METADATA_CHANGE - || !params.equals(getMetadataCompactionParams()) - || hasVector != factory.getRealm().metadata().hasVectorType(); - } - private static CompactionParams createMetadataParams(@Nullable CompactionStrategyContainer previous, CompactionParams compactionParams, ReloadReason reason) diff --git a/src/java/org/apache/cassandra/db/compaction/UnifiedCompactionStrategy.md b/src/java/org/apache/cassandra/db/compaction/UnifiedCompactionStrategy.md index cb14ba493368..390a0ba0be76 100644 --- a/src/java/org/apache/cassandra/db/compaction/UnifiedCompactionStrategy.md +++ b/src/java/org/apache/cassandra/db/compaction/UnifiedCompactionStrategy.md @@ -463,10 +463,6 @@ the span of the lower-density ones. UCS accepts these compaction strategy parameters: -* `override_ucs_config_for_vector_tables` Allows different configurations for vector and non-vector tables. When set - to `true`, if a table has a column of `VectorType`, the "vector" parameters will be used instead of the regular - parameters. For example, `vector_min_sstable_size` will be used, and `min_sstable_size` will be ignored. - The default value is `false` which disables this feature. * `scaling_parameters` A list of per-level scaling parameters, specified as L*f*, T*f*, N, or an integer value specifying $w$ directly. If more levels are present than the length of this list, the last value is used for all higher levels. Often this will be a single parameter, specifying the behaviour for all levels of the @@ -481,8 +477,6 @@ UCS accepts these compaction strategy parameters: compaction to be promoted to the next level) and a fan factor of 2. This can also be specified as T2 or L2. The default value is T4, matching the default STCS behaviour with threshold 4. To select an equivalent of LCS with its default fan factor 10, use L10. -* `vector_scaling_parameters` A list of per-level scaling parameters used for vector tables when `override_ucs_config_for_vector_tables=true`. - The default value is -8 or L10. * `target_sstable_size` The target sstable size $t$, specified as a human-friendly size in bytes (e.g. 100 MiB = $100\cdot 2^{20}$ B or (10 MB = 10,000,000 B)). The strategy will split data in shards that aim to produce sstables of size between $t / \sqrt 2$ and $t \cdot \sqrt 2$. @@ -491,14 +485,10 @@ UCS accepts these compaction strategy parameters: Increase this if the memory pressure from the number of sstables in the system becomes too high. Also see `sstable_growth` below. The default value is 1 GiB. -* `vector_target_sstable_size` The target sstable size used for vector tables when `override_ucs_config_for_vector_tables=true`. - The default value is 5GiB. * `base_shard_count` The minimum number of shards $b$, used for levels with the smallest density. This gives the minimum compaction concurrency for the lowest levels. A low number would result in larger L0 sstables but may limit the overall maximum write throughput (as every piece of data has to go through L0). The base shard count only applies after `min_sstable_size` is reached. The default value is 4 for all tables. -* `vector_base_shard_count` The base shard count used for vector tables when `override_ucs_config_for_vector_tables=true`. - The default value is 1. * `sstable_growth` The sstable growth component $\lambda$, applied as a factor in the shard exponent calculation. This is a number between 0 and 1 that controls what part of the density growth should apply to individual sstable size and what part should increase the number of shards. Using a value of 1 has the effect of fixing the shard @@ -513,14 +503,10 @@ UCS accepts these compaction strategy parameters: two can be further tweaked by increasing $\lambda$ to get fewer but bigger sstables on the top level, and decreasing it to favour a higher count of smaller sstables. The default value is 0.333 meaning the sstable size grows with the square root of the growth of the shard count. -* `vector_sstable_growth` The sstable growth component used for vector tables when `override_ucs_config_for_vector_tables=true`. - The default value is 1 which means the shard count will be fixed to the base value. * `min_sstable_size` The minimum sstable size $m$, applicable when the base shard count will result is sstables that are considered too small. If set, the strategy will split the space into fewer than the base count shards, to make the estimated sstables size at least as large as this value. A value of 0 disables this feature. A value of `auto` sets the minimum sstable size to the size of sstables resulting from flushes. The default value is 100MiB. -* `vector_min_sstable_size` The minimum sstable size used for vector tables when `override_ucs_config_for_vector_tables=true`. - The default value is 1024MiB. * `reserved_threads` Specifies the number of threads to reserve per level. Any remaining threads will take work according to the prioritization mechanism (i.e. higher overlap first). Higher reservations mean better responsiveness of the compaction strategy to new work, or smoother performance, at the expense of reducing the @@ -528,8 +514,6 @@ UCS accepts these compaction strategy parameters: The default value is `max`, which spreads all threads as close to evenly between levels as possible. It is recommended to keep this option and the next at their defaults, which should offer a good balance between responsiveness and thread utilization. -* `vector_reserved_threads` Specifies the number of threads to reserve per level for vector tables when `override_ucs_config_for_vector_tables=true`. - The default value is `max`. * `reservations_type` Specifies whether reservations can be used by lower levels. If set to `per_level`, the reservations are only used by the specific level. If set to `level_or_below`, the reservations can be used by this level as well as any one below it. diff --git a/src/java/org/apache/cassandra/db/compaction/unified/AdaptiveController.java b/src/java/org/apache/cassandra/db/compaction/unified/AdaptiveController.java index 4278c3d5245c..c077c91d1aae 100644 --- a/src/java/org/apache/cassandra/db/compaction/unified/AdaptiveController.java +++ b/src/java/org/apache/cassandra/db/compaction/unified/AdaptiveController.java @@ -119,7 +119,6 @@ public AdaptiveController(MonotonicClock clock, Reservations.Type reservationsType, Overlaps.InclusionMethod overlapInclusionMethod, boolean parallelizeOutputShards, - boolean hasVectorType, int intervalSec, int minScalingParameter, int maxScalingParameter, @@ -147,8 +146,7 @@ public AdaptiveController(MonotonicClock clock, reservedThreadsPerLevel, reservationsType, overlapInclusionMethod, - parallelizeOutputShards, - hasVectorType); + parallelizeOutputShards); this.scalingParameters = scalingParameters; this.previousScalingParameters = previousScalingParameters; @@ -177,9 +175,8 @@ static Controller fromOptions(Environment env, double sstableGrowthModifier, int reservedThreadsPerLevel, Reservations.Type reservationsType, - Overlaps.InclusionMethod overlapInclusionMethod, boolean parallelizeOutputShards, - boolean hasVectorType, + Overlaps.InclusionMethod overlapInclusionMethod, String keyspaceName, String tableName, Map options) @@ -279,7 +276,6 @@ else if (staticScalingFactors != null) reservationsType, overlapInclusionMethod, parallelizeOutputShards, - hasVectorType, intervalSec, minScalingParameter, maxScalingParameter, @@ -327,9 +323,6 @@ else if (staticScalingFactors != null) parseScalingParameters(staticScalingFactors); else if (staticScalingParameters != null) parseScalingParameters(staticScalingParameters); - String vectorScalingParameters = options.remove(VECTOR_SCALING_PARAMETERS_OPTION); - if (vectorScalingParameters != null) - throw new ConfigurationException(String.format("%s option is not supported with Adaptive UCS", VECTOR_SCALING_PARAMETERS_OPTION)); s = options.remove(MIN_SCALING_PARAMETER); if (s != null) minScalingParameter = Integer.parseInt(s); diff --git a/src/java/org/apache/cassandra/db/compaction/unified/Controller.java b/src/java/org/apache/cassandra/db/compaction/unified/Controller.java index 9bbff9c68274..64e1799aad7b 100644 --- a/src/java/org/apache/cassandra/db/compaction/unified/Controller.java +++ b/src/java/org/apache/cassandra/db/compaction/unified/Controller.java @@ -46,7 +46,6 @@ import org.apache.cassandra.db.compaction.CompactionRealm; import org.apache.cassandra.db.compaction.CompactionStrategy; import org.apache.cassandra.db.compaction.UnifiedCompactionStrategy; -import org.apache.cassandra.db.marshal.VectorType; import org.apache.cassandra.exceptions.ConfigurationException; import org.apache.cassandra.io.util.File; import org.apache.cassandra.io.util.FileWriter; @@ -120,13 +119,11 @@ public abstract class Controller * In UCS V1 mode (engaged by using "num_shards" above) the default 'auto'. */ static final String MIN_SSTABLE_SIZE_OPTION = "min_sstable_size"; - static final String VECTOR_MIN_SSTABLE_SIZE_OPTION = "vector_min_sstable_size"; @Deprecated static final String MIN_SSTABLE_SIZE_OPTION_MB = "min_sstable_size_in_mb"; static final String MIN_SSTABLE_SIZE_OPTION_AUTO = "auto"; static final long DEFAULT_MIN_SSTABLE_SIZE = FBUtilities.parseHumanReadableBytes(getSystemProperty(MIN_SSTABLE_SIZE_OPTION, "100MiB")); - static final long VECTOR_DEFAULT_MIN_SSTABLE_SIZE = FBUtilities.parseHumanReadableBytes(System.getProperty(PREFIX + VECTOR_MIN_SSTABLE_SIZE_OPTION, "1024MiB")); /** * Value to use to set the min sstable size from the flush size. */ @@ -154,25 +151,20 @@ public abstract class Controller static final double MAX_SPACE_OVERHEAD_UPPER_BOUND = 1.0; static final String BASE_SHARD_COUNT_OPTION = "base_shard_count"; - static final String VECTOR_BASE_SHARD_COUNT_OPTION = "vector_base_shard_count"; /** - * Default base shard count, used when a base count is not explicitly supplied. This value applies to all tables as - * long as they are larger than the minimum sstable size. + * Default base shard count, used when a base count is not explicitly supplied. This value applies as long as the + * table is not a system one, and directories are not defined. * * For others a base count of 1 is used as system tables are usually small and do not need as much compaction * parallelism, while having directories defined provides for parallelism in a different way. */ public static final int DEFAULT_BASE_SHARD_COUNT = Integer.parseInt(getSystemProperty(BASE_SHARD_COUNT_OPTION, "4")); - public static final int VECTOR_DEFAULT_BASE_SHARD_COUNT = Integer.parseInt(System.getProperty(PREFIX + VECTOR_BASE_SHARD_COUNT_OPTION, "1")); - /** * The target SSTable size. This is the size of the SSTables that the controller will try to create. */ static final String TARGET_SSTABLE_SIZE_OPTION = "target_sstable_size"; - static final String VECTOR_TARGET_SSTABLE_SIZE_OPTION = "vector_target_sstable_size"; - public static final long DEFAULT_TARGET_SSTABLE_SIZE = FBUtilities.parseHumanReadableBytes(getSystemProperty(TARGET_SSTABLE_SIZE_OPTION, "1GiB")); - public static final long VECTOR_DEFAULT_TARGET_SSTABLE_SIZE = FBUtilities.parseHumanReadableBytes(System.getProperty(PREFIX + VECTOR_TARGET_SSTABLE_SIZE_OPTION, "5GiB")); + public static final long DEFAULT_TARGET_SSTABLE_SIZE = FBUtilities.parseHumanReadableBytes(getSystemProperty(TARGET_SSTABLE_SIZE_OPTION, "5GiB")); static final long MIN_TARGET_SSTABLE_SIZE = 1L << 20; static final String IS_REPLICA_AWARE_OPTION = "is_replica_aware"; @@ -204,9 +196,7 @@ public abstract class Controller * a growth value of 0.333, and 64 (~16GiB each) for a growth value of 0.5. */ static final String SSTABLE_GROWTH_OPTION = "sstable_growth"; - static final String VECTOR_SSTABLE_GROWTH_OPTION = "vector_sstable_growth"; - static final double DEFAULT_SSTABLE_GROWTH = FBUtilities.parsePercent(getSystemProperty(SSTABLE_GROWTH_OPTION, "0.333")); - static final double VECTOR_DEFAULT_SSTABLE_GROWTH = FBUtilities.parsePercent(System.getProperty(PREFIX + VECTOR_SSTABLE_GROWTH_OPTION, "1.0")); + static final double DEFAULT_SSTABLE_GROWTH = FBUtilities.parsePercent(getSystemProperty(SSTABLE_GROWTH_OPTION, "0.5")); /** * Number of reserved threads to keep for each compaction level. This is used to ensure that there are always @@ -220,9 +210,7 @@ public abstract class Controller * The default value is max, all compaction threads are distributed among the levels. */ static final String RESERVED_THREADS_OPTION = "reserved_threads"; - static final String VECTOR_RESERVED_THREADS_OPTION = "vector_reserved_threads"; public static final int DEFAULT_RESERVED_THREADS = FBUtilities.parseIntAllowingMax(getSystemProperty(RESERVED_THREADS_OPTION, "max")); - public static final int VECTOR_DEFAULT_RESERVED_THREADS = FBUtilities.parseIntAllowingMax(System.getProperty(PREFIX + VECTOR_RESERVED_THREADS_OPTION, "max")); /** * Reservation type, defining whether reservations can be used by lower levels. If set to `per_level`, the @@ -265,15 +253,6 @@ public abstract class Controller static final boolean ALLOW_UNSAFE_AGGRESSIVE_SSTABLE_EXPIRATION = Boolean.parseBoolean(System.getProperty(ALLOW_UNSAFE_AGGRESSIVE_SSTABLE_EXPIRATION_PROPERTY)); static final boolean DEFAULT_ALLOW_UNSAFE_AGGRESSIVE_SSTABLE_EXPIRATION = false; - /** - * This property allows seperate configurations for vector and non-vector tables. If this property is set to true - * and the table has a {@link VectorType}, the "vector" options are used over the regular options. For instance, - * "vector_sstable_growth" will be used over "sstable_growth" - */ - static final String OVERRIDE_UCS_CONFIG_FOR_VECTOR_TABLES_OPTION = "override_ucs_config_for_vector_tables"; - static final String OVERRIDE_UCS_CONFIG_FOR_VECTOR_TABLES_PROPERTY = PREFIX + "override_ucs_config_for_vector_tables"; - static final boolean DEFAULT_OVERRIDE_UCS_CONFIG_FOR_VECTOR_TABLES = Boolean.parseBoolean(System.getProperty(OVERRIDE_UCS_CONFIG_FOR_VECTOR_TABLES_PROPERTY, "false")); - static final int DEFAULT_EXPIRED_SSTABLE_CHECK_FREQUENCY_SECONDS = 60 * 10; static final String EXPIRED_SSTABLE_CHECK_FREQUENCY_SECONDS_OPTION = "expired_sstable_check_frequency_seconds"; @@ -314,7 +293,6 @@ public abstract class Controller * Higher indexes will use the value of the last index with a W specified. */ static final String SCALING_PARAMETERS_OPTION = "scaling_parameters"; - static final String VECTOR_SCALING_PARAMETERS_OPTION = "vector_scaling_parameters"; @Deprecated static final String STATIC_SCALING_FACTORS_OPTION = "static_scaling_factors"; @@ -348,7 +326,6 @@ public abstract class Controller protected final Overlaps.InclusionMethod overlapInclusionMethod; final boolean l0ShardsEnabled; - final boolean hasVectorType; Controller(MonotonicClock clock, Environment env, @@ -368,8 +345,7 @@ public abstract class Controller int reservedThreads, Reservations.Type reservationsType, Overlaps.InclusionMethod overlapInclusionMethod, - boolean parallelizeOutputShards, - boolean hasVectorType) + boolean parallelizeOutputShards) { this.clock = clock; this.env = env; @@ -389,7 +365,6 @@ public abstract class Controller this.maxSpaceOverhead = maxSpaceOverhead; this.l0ShardsEnabled = Boolean.parseBoolean(getSystemProperty(L0_SHARDS_ENABLED_OPTION, "false")); // FIXME VECTOR-23 this.parallelizeOutputShards = parallelizeOutputShards; - this.hasVectorType = hasVectorType; if (maxSSTablesToCompact <= 0) // use half the maximum permitted compaction size as upper bound by default maxSSTablesToCompact = (int) (dataSetSize * this.maxSpaceOverhead * 0.5 / getMinSstableSizeBytes()); @@ -671,7 +646,6 @@ public long getMinSstableSizeBytes() } } - /** * Return the flush sstable size in bytes. * @@ -781,11 +755,6 @@ public void shutdown() logger.debug("Stopped compaction controller {}", this); } - public boolean hasVectorType() - { - return hasVectorType; - } - /** * @return true if the controller is running */ @@ -908,18 +877,6 @@ private double getWriteIOCost() public static Controller fromOptions(CompactionRealm realm, Map options) { - boolean hasVectorType = realm.metadata().hasVectorType(); - boolean vectorOverride = options.containsKey(OVERRIDE_UCS_CONFIG_FOR_VECTOR_TABLES_OPTION) - ? Boolean.parseBoolean(options.get(OVERRIDE_UCS_CONFIG_FOR_VECTOR_TABLES_OPTION)) - : DEFAULT_OVERRIDE_UCS_CONFIG_FOR_VECTOR_TABLES; - boolean useVectorOptions = hasVectorType && vectorOverride; - if (logger.isTraceEnabled()) - { - if (useVectorOptions) - logger.trace("Using UCS configuration optimized for vector for {}.{}", realm.getKeyspaceName(), realm.getTableName()); - else - logger.trace("Using non-vector UCS configuration for {}.{}", realm.getKeyspaceName(), realm.getTableName()); - } boolean adaptive = options.containsKey(ADAPTIVE_OPTION) ? Boolean.parseBoolean(options.get(ADAPTIVE_OPTION)) : DEFAULT_ADAPTIVE; long dataSetSize = getSizeWithAlt(options, DATASET_SIZE_OPTION, DATASET_SIZE_OPTION_GB, 30, DEFAULT_DATASET_SIZE); long flushSizeOverride = getSizeWithAlt(options, FLUSH_SIZE_OVERRIDE_OPTION, FLUSH_SIZE_OVERRIDE_OPTION_MB, 20, 0); @@ -943,15 +900,6 @@ public static Controller fromOptions(CompactionRealm realm, Map { baseShardCount = DEFAULT_BASE_SHARD_COUNT; } - int vectorBaseShardCount; - if (options.containsKey(VECTOR_BASE_SHARD_COUNT_OPTION)) - { - vectorBaseShardCount = Integer.parseInt(options.get(VECTOR_BASE_SHARD_COUNT_OPTION)); - } - else - { - vectorBaseShardCount = VECTOR_DEFAULT_BASE_SHARD_COUNT; - } boolean isReplicaAware = options.containsKey(IS_REPLICA_AWARE_OPTION) ? Boolean.parseBoolean(options.get(IS_REPLICA_AWARE_OPTION)) @@ -960,27 +908,15 @@ public static Controller fromOptions(CompactionRealm realm, Map long targetSStableSize = options.containsKey(TARGET_SSTABLE_SIZE_OPTION) ? FBUtilities.parseHumanReadableBytes(options.get(TARGET_SSTABLE_SIZE_OPTION)) : DEFAULT_TARGET_SSTABLE_SIZE; - long vectorTargetSStableSize = options.containsKey(VECTOR_TARGET_SSTABLE_SIZE_OPTION) - ? FBUtilities.parseHumanReadableBytes(options.get(VECTOR_TARGET_SSTABLE_SIZE_OPTION)) - : VECTOR_DEFAULT_TARGET_SSTABLE_SIZE; long minSSTableSize = getSizeWithAltAndSpecial(options, MIN_SSTABLE_SIZE_OPTION, MIN_SSTABLE_SIZE_OPTION_MB, 20, MIN_SSTABLE_SIZE_OPTION_AUTO, MIN_SSTABLE_SIZE_AUTO, DEFAULT_MIN_SSTABLE_SIZE); - long vectorMinSSTableSize = getSizeWithSpecial(options, VECTOR_MIN_SSTABLE_SIZE_OPTION, MIN_SSTABLE_SIZE_OPTION_AUTO, MIN_SSTABLE_SIZE_AUTO, VECTOR_DEFAULT_MIN_SSTABLE_SIZE); double sstableGrowthModifier = DEFAULT_SSTABLE_GROWTH; if (options.containsKey(SSTABLE_GROWTH_OPTION)) sstableGrowthModifier = FBUtilities.parsePercent(options.get(SSTABLE_GROWTH_OPTION)); - double vectorSSTableGrowthModifier = VECTOR_DEFAULT_SSTABLE_GROWTH; - if (options.containsKey(VECTOR_SSTABLE_GROWTH_OPTION)) - vectorSSTableGrowthModifier = FBUtilities.parsePercent(options.get(VECTOR_SSTABLE_GROWTH_OPTION)); - int reservedThreadsPerLevel = options.containsKey(RESERVED_THREADS_OPTION) ? FBUtilities.parseIntAllowingMax(options.get(RESERVED_THREADS_OPTION)) : DEFAULT_RESERVED_THREADS; - - int vectorReservedThreadsPerLevel = options.containsKey(VECTOR_RESERVED_THREADS_OPTION) - ? FBUtilities.parseIntAllowingMax(options.get(VECTOR_RESERVED_THREADS_OPTION)) - : VECTOR_DEFAULT_RESERVED_THREADS; Reservations.Type reservationsType = options.containsKey(RESERVATIONS_TYPE_OPTION) ? Reservations.Type.valueOf(options.get(RESERVATIONS_TYPE_OPTION).toUpperCase()) : DEFAULT_RESERVED_THREADS_TYPE; @@ -1037,46 +973,43 @@ public static Controller fromOptions(CompactionRealm realm, Map ? AdaptiveController.fromOptions(env, survivalFactors, dataSetSize, - useVectorOptions ? vectorMinSSTableSize : minSSTableSize, + minSSTableSize, flushSizeOverride, maxSpaceOverhead, maxSSTablesToCompact, expiredSSTableCheckFrequency, ignoreOverlapsInExpirationCheck, - useVectorOptions ? vectorBaseShardCount : baseShardCount, + baseShardCount, isReplicaAware, - useVectorOptions ? vectorTargetSStableSize : targetSStableSize, - useVectorOptions ? vectorSSTableGrowthModifier : sstableGrowthModifier, - useVectorOptions ? vectorReservedThreadsPerLevel : reservedThreadsPerLevel, + targetSStableSize, + sstableGrowthModifier, + reservedThreadsPerLevel, reservationsType, - overlapInclusionMethod, parallelizeOutputShards, - hasVectorType, + overlapInclusionMethod, realm.getKeyspaceName(), realm.getTableName(), options) : StaticController.fromOptions(env, survivalFactors, dataSetSize, - useVectorOptions ? vectorMinSSTableSize : minSSTableSize, + minSSTableSize, flushSizeOverride, maxSpaceOverhead, maxSSTablesToCompact, expiredSSTableCheckFrequency, ignoreOverlapsInExpirationCheck, - useVectorOptions ? vectorBaseShardCount : baseShardCount, + baseShardCount, isReplicaAware, - useVectorOptions ? vectorTargetSStableSize : targetSStableSize, - useVectorOptions ? vectorSSTableGrowthModifier : sstableGrowthModifier, - useVectorOptions ? vectorReservedThreadsPerLevel : reservedThreadsPerLevel, + targetSStableSize, + sstableGrowthModifier, + reservedThreadsPerLevel, reservationsType, overlapInclusionMethod, parallelizeOutputShards, - hasVectorType, realm.getKeyspaceName(), realm.getTableName(), - options, - useVectorOptions); + options); } public static Map validateOptions(Map options) throws ConfigurationException @@ -1090,9 +1023,7 @@ public static Map validateOptions(Map options) t String s; boolean adaptive = DEFAULT_ADAPTIVE; long minSSTableSize = -1; - long vectorMinSSTableSize = -1; long targetSSTableSize = DEFAULT_TARGET_SSTABLE_SIZE; - long vectorTargetSSTableSize = VECTOR_DEFAULT_TARGET_SSTABLE_SIZE; s = options.remove(NUM_SHARDS_OPTION); if (s != null) @@ -1127,7 +1058,6 @@ public static Map validateOptions(Map options) t validateBoolean(options, PARALLELIZE_OUTPUT_SHARDS_OPTION, DEFAULT_PARALLELIZE_OUTPUT_SHARDS); minSSTableSize = validateSizeWithAlt(options, MIN_SSTABLE_SIZE_OPTION, MIN_SSTABLE_SIZE_OPTION_MB, 20, MIN_SSTABLE_SIZE_OPTION_AUTO, -1, DEFAULT_MIN_SSTABLE_SIZE); - vectorMinSSTableSize = validateSizeWithSpecial(options, VECTOR_MIN_SSTABLE_SIZE_OPTION, MIN_SSTABLE_SIZE_OPTION_AUTO, -1, VECTOR_DEFAULT_MIN_SSTABLE_SIZE); validateSizeWithAlt(options, FLUSH_SIZE_OVERRIDE_OPTION, FLUSH_SIZE_OVERRIDE_OPTION_MB, 20); validateSizeWithAlt(options, DATASET_SIZE_OPTION, DATASET_SIZE_OPTION_GB, 30); @@ -1190,13 +1120,6 @@ public static Map validateOptions(Map options) t validateBoolean(options, ALLOW_UNSAFE_AGGRESSIVE_SSTABLE_EXPIRATION_OPTION, false); - s = options.remove(OVERRIDE_UCS_CONFIG_FOR_VECTOR_TABLES_OPTION); - if (s != null && !s.equalsIgnoreCase("true") && !s.equalsIgnoreCase("false")) - { - throw new ConfigurationException(String.format(booleanParseErr, - OVERRIDE_UCS_CONFIG_FOR_VECTOR_TABLES_OPTION, s)); - } - s = options.remove(BASE_SHARD_COUNT_OPTION); if (s != null) { @@ -1214,23 +1137,6 @@ public static Map validateOptions(Map options) t } } - s = options.remove(VECTOR_BASE_SHARD_COUNT_OPTION); - if (s != null) - { - try - { - int numShards = Integer.parseInt(s); - if (numShards <= 0) - throw new ConfigurationException(String.format(nonPositiveErr, - VECTOR_BASE_SHARD_COUNT_OPTION, - numShards)); - } - catch (NumberFormatException e) - { - throw new ConfigurationException(String.format(intParseErr, s, VECTOR_BASE_SHARD_COUNT_OPTION), e); - } - } - s = options.remove(TARGET_SSTABLE_SIZE_OPTION); if (s != null) { @@ -1252,27 +1158,6 @@ public static Map validateOptions(Map options) t } } - s = options.remove(VECTOR_TARGET_SSTABLE_SIZE_OPTION); - if (s != null) - { - try - { - vectorTargetSSTableSize = FBUtilities.parseHumanReadableBytes(s); - if (vectorTargetSSTableSize < MIN_TARGET_SSTABLE_SIZE) - throw new ConfigurationException(String.format("%s %s is not acceptable, size must be at least %s", - VECTOR_TARGET_SSTABLE_SIZE_OPTION, - s, - FBUtilities.prettyPrintMemory(MIN_TARGET_SSTABLE_SIZE))); - } - catch (NumberFormatException e) - { - throw new ConfigurationException(String.format("%s is not a valid size in bytes: %s", - VECTOR_TARGET_SSTABLE_SIZE_OPTION, - e.getMessage()), - e); - } - } - s = options.remove(SSTABLE_GROWTH_OPTION); if (s != null) { @@ -1293,26 +1178,6 @@ public static Map validateOptions(Map options) t } } - s = options.remove(VECTOR_SSTABLE_GROWTH_OPTION); - if (s != null) - { - try - { - double targetSSTableGrowth = FBUtilities.parsePercent(s); - if (targetSSTableGrowth < 0 || targetSSTableGrowth > 1) - throw new ConfigurationException(String.format("%s %s must be between 0 and 1", - VECTOR_SSTABLE_GROWTH_OPTION, - s)); - } - catch (NumberFormatException e) - { - throw new ConfigurationException(String.format("%s is not a valid number between 0 and 1: %s", - VECTOR_SSTABLE_GROWTH_OPTION, - e.getMessage()), - e); - } - } - s = options.remove(RESERVED_THREADS_OPTION); if (s != null) { @@ -1333,26 +1198,6 @@ public static Map validateOptions(Map options) t } } - s = options.remove(VECTOR_RESERVED_THREADS_OPTION); - if (s != null) - { - try - { - int reservedThreads = FBUtilities.parseIntAllowingMax(s); - if (reservedThreads < 0) - throw new ConfigurationException(String.format("%s %s must be an integer >= 0 or \"max\"", - VECTOR_RESERVED_THREADS_OPTION, - s)); - } - catch (NumberFormatException e) - { - throw new ConfigurationException(String.format("%s is not a valid integer >= 0 or \"max\": %s", - VECTOR_RESERVED_THREADS_OPTION, - e.getMessage()), - e); - } - } - s = options.remove(RESERVATIONS_TYPE_OPTION); if (s != null) { @@ -1387,10 +1232,6 @@ public static Map validateOptions(Map options) t throw new ConfigurationException(String.format("The minimum sstable size %s cannot be larger than the target size's lower bound %s.", FBUtilities.prettyPrintMemory(minSSTableSize), FBUtilities.prettyPrintMemory((long) (targetSSTableSize * INVERSE_SQRT_2)))); - if (vectorMinSSTableSize > vectorTargetSSTableSize * INVERSE_SQRT_2) - throw new ConfigurationException(String.format("The vector minimum sstable size %s cannot be larger than the target size's lower bound %s.", - FBUtilities.prettyPrintMemory(vectorMinSSTableSize), - FBUtilities.prettyPrintMemory((long) (vectorTargetSSTableSize * INVERSE_SQRT_2)))); return adaptive ? AdaptiveController.validateOptions(options) : StaticController.validateOptions(options); } @@ -1425,16 +1266,6 @@ private static boolean validateBoolean(Map options, String optio return defaultValue; } - private static long getSizeWithSpecial(Map options, String optionHumanReadable, String specialText, long specialValue, long defaultValue) - { - if (specialText.equalsIgnoreCase(options.get(optionHumanReadable))) - return specialValue; - else if (options.containsKey(optionHumanReadable)) - return FBUtilities.parseHumanReadableBytes(options.get(optionHumanReadable)); - else - return defaultValue; - } - private static void validateSizeWithAlt(Map options, String optionHumanReadable, String optionAlt, int altShift) { validateSizeWithAlt(options, optionHumanReadable, optionAlt, altShift, null, 0, 0); @@ -1488,47 +1319,6 @@ private static long validateSizeWithAlt(Map options, String opti return sizeInBytes; } - private static long validateSizeWithSpecial(Map options, String optionHumanReadable, String specialText, long specialValue, long defaultValue) - { - long sizeInBytes; - String s = null; - try - { - s = options.remove(optionHumanReadable); - if (s != null) - { - if (s.equalsIgnoreCase(specialText)) - return specialValue; // all good - sizeInBytes = FBUtilities.parseHumanReadableBytes(s); - } - else - { - return defaultValue; - } - - } - catch (NumberFormatException e) - { - if (specialText != null) - throw new ConfigurationException(String.format("%s must be a valid size in bytes or %s for %s", - s, - specialText, - optionHumanReadable), - e); - else - throw new ConfigurationException(String.format("%s is not a valid size in bytes for %s", - s, - optionHumanReadable), - e); - } - - if (sizeInBytes < 0) - throw new ConfigurationException(String.format("Invalid configuration, %s should be positive: %s", - optionHumanReadable, - s)); - return sizeInBytes; - } - private static void validateOneOf(Map options, String option1, String option2) { if (options.containsKey(option1) && options.containsKey(option2)) diff --git a/src/java/org/apache/cassandra/db/compaction/unified/StaticController.java b/src/java/org/apache/cassandra/db/compaction/unified/StaticController.java index 9cfd617c82a7..b14007dfb83f 100644 --- a/src/java/org/apache/cassandra/db/compaction/unified/StaticController.java +++ b/src/java/org/apache/cassandra/db/compaction/unified/StaticController.java @@ -46,7 +46,6 @@ public class StaticController extends Controller * Higher indexes will use the value of the last index with a W specified. */ private static final String DEFAULT_STATIC_SCALING_PARAMETERS = getSystemProperty(SCALING_PARAMETERS_OPTION, "T4"); - private static final String VECTOR_DEFAULT_STATIC_SCALING_PARAMETERS = System.getProperty(PREFIX + VECTOR_SCALING_PARAMETERS_OPTION, "-8"); private final int[] scalingParameters; @VisibleForTesting // comp. simulation @@ -69,7 +68,6 @@ public StaticController(Environment env, Reservations.Type reservationsType, Overlaps.InclusionMethod overlapInclusionMethod, boolean parallelizeOutputShards, - boolean hasVectorType, String keyspaceName, String tableName) { @@ -91,8 +89,7 @@ public StaticController(Environment env, reservedThreadsPerLevel, reservationsType, overlapInclusionMethod, - parallelizeOutputShards, - hasVectorType); + parallelizeOutputShards); this.scalingParameters = scalingParameters; this.keyspaceName = keyspaceName; this.tableName = tableName; @@ -115,20 +112,15 @@ static Controller fromOptions(Environment env, Reservations.Type reservationsType, Overlaps.InclusionMethod overlapInclusionMethod, boolean parallelizeOutputShards, - boolean hasVectorType, String keyspaceName, String tableName, - Map options, - boolean useVectorOptions) + Map options) { int[] scalingParameters; if (options.containsKey(STATIC_SCALING_FACTORS_OPTION)) scalingParameters = parseScalingParameters(options.get(STATIC_SCALING_FACTORS_OPTION)); else scalingParameters = parseScalingParameters(options.getOrDefault(SCALING_PARAMETERS_OPTION, DEFAULT_STATIC_SCALING_PARAMETERS)); - - int[] vectorScalingParameters = parseScalingParameters(options.getOrDefault(VECTOR_SCALING_PARAMETERS_OPTION, VECTOR_DEFAULT_STATIC_SCALING_PARAMETERS)); - long currentFlushSize = flushSizeOverride; File f = getControllerConfigPath(keyspaceName, tableName); @@ -151,7 +143,7 @@ static Controller fromOptions(Environment env, logger.warn("Unable to parse saved flush size. Using starting value instead:", e); } return new StaticController(env, - useVectorOptions ? vectorScalingParameters : scalingParameters, + scalingParameters, survivalFactors, dataSetSize, minSSTableSize, @@ -169,7 +161,6 @@ static Controller fromOptions(Environment env, reservationsType, overlapInclusionMethod, parallelizeOutputShards, - hasVectorType, keyspaceName, tableName); } @@ -184,9 +175,6 @@ public static Map validateOptions(Map options) t parseScalingParameters(factors); if (parameters != null && factors != null) throw new ConfigurationException(String.format("Either '%s' or '%s' should be used, not both", SCALING_PARAMETERS_OPTION, STATIC_SCALING_FACTORS_OPTION)); - String vectorParameters = options.remove(VECTOR_SCALING_PARAMETERS_OPTION); - if (vectorParameters != null) - parseScalingParameters(vectorParameters); return options; } @@ -227,9 +215,6 @@ public void storeControllerConfig() @Override public String toString() { - return String.format("Static controller, m: %d, o: %s, scalingParameters: %s, cost: %s", minSSTableSize, - Arrays.toString(survivalFactors), - printScalingParameters(scalingParameters), - calculator); + return String.format("Static controller, m: %d, o: %s, scalingParameters: %s, cost: %s", minSSTableSize, Arrays.toString(survivalFactors), printScalingParameters(scalingParameters), calculator); } } \ No newline at end of file diff --git a/src/java/org/apache/cassandra/schema/TableMetadata.java b/src/java/org/apache/cassandra/schema/TableMetadata.java index ba5e1db8d84d..cc21507c4a85 100644 --- a/src/java/org/apache/cassandra/schema/TableMetadata.java +++ b/src/java/org/apache/cassandra/schema/TableMetadata.java @@ -422,16 +422,6 @@ public boolean hasStaticColumns() return !staticColumns().isEmpty(); } - public boolean hasVectorType() - { - for (ColumnMetadata column : columns.values()) - { - if (column.type.isVector()) - return true; - } - return false; - } - public final void validate() { validate(false); diff --git a/test/distributed/org/apache/cassandra/distributed/test/CompactionControllerConfigTest.java b/test/distributed/org/apache/cassandra/distributed/test/CompactionControllerConfigTest.java index 77e219814e83..e6659584ec35 100644 --- a/test/distributed/org/apache/cassandra/distributed/test/CompactionControllerConfigTest.java +++ b/test/distributed/org/apache/cassandra/distributed/test/CompactionControllerConfigTest.java @@ -176,66 +176,4 @@ public void testStoreAndCleanupControllerConfig() throws Throwable } } - - @Test - public void testVectorControllerConfig() throws Throwable - { - vectorControllerConfig(true); - vectorControllerConfig(false); - } - - - public void vectorControllerConfig(boolean vectorOverride) throws Throwable - { - System.setProperty("unified_compaction.override_ucs_config_for_vector_tables", String.valueOf(vectorOverride)); - try(Cluster cluster = init(Cluster.build(1).start())) - { - cluster.schemaChange(withKeyspace("CREATE KEYSPACE ks WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 2};")); - cluster.schemaChange(withKeyspace("CREATE TABLE ks.tbl (pk int, ck int, val vector, PRIMARY KEY (pk, ck)) WITH compaction = " + - "{'class': 'UnifiedCompactionStrategy', " + - "'adaptive': 'false', " + - "'scaling_parameters': '0'};")); - cluster.schemaChange(withKeyspace("CREATE TABLE ks.tbl2 (pk int, ck int, PRIMARY KEY (pk, ck)) WITH compaction = " + - "{'class': 'UnifiedCompactionStrategy', " + - "'adaptive': 'false', " + - "'scaling_parameters': '0'};")); - - cluster.get(1).runOnInstance(() -> - { - ColumnFamilyStore cfs = Keyspace.open("ks").getColumnFamilyStore("tbl"); - UnifiedCompactionContainer container = (UnifiedCompactionContainer) cfs.getCompactionStrategy(); - UnifiedCompactionStrategy ucs = (UnifiedCompactionStrategy) container.getStrategies().get(0); - Controller controller = ucs.getController(); - // ucs config should be set to the vector config - if (vectorOverride) - assertEquals(controller.getScalingParameter(0), -8); - else - assertEquals(controller.getScalingParameter(0), 0); - - ColumnFamilyStore cfs2 = Keyspace.open("ks").getColumnFamilyStore("tbl2"); - UnifiedCompactionContainer container2 = (UnifiedCompactionContainer) cfs2.getCompactionStrategy(); - UnifiedCompactionStrategy ucs2 = (UnifiedCompactionStrategy) container2.getStrategies().get(0); - Controller controller2 = ucs2.getController(); - // since tbl2 does not have a vectorType the ucs config should not be set to the vector config - if (vectorOverride) - assertEquals(controller2.getScalingParameter(0), 0); - else - assertEquals(controller2.getScalingParameter(0), 0); - }); - cluster.schemaChange(withKeyspace("ALTER TABLE ks.tbl2 ADD val vector;")); - cluster.get(1).runOnInstance(() -> - { - ColumnFamilyStore cfs2 = Keyspace.open("ks").getColumnFamilyStore("tbl2"); - UnifiedCompactionContainer container2 = (UnifiedCompactionContainer) cfs2.getCompactionStrategy(); - UnifiedCompactionStrategy ucs2 = (UnifiedCompactionStrategy) container2.getStrategies().get(0); - Controller controller2 = ucs2.getController(); - // a vector was added to tbl2 so it should now have the vector config - if (vectorOverride) - assertEquals(controller2.getScalingParameter(0), -8); - else - assertEquals(controller2.getScalingParameter(0), 0); - }); - - } - } } diff --git a/test/unit/org/apache/cassandra/db/compaction/CompactionSimulationTest.java b/test/unit/org/apache/cassandra/db/compaction/CompactionSimulationTest.java index d5e621781790..cfcbe5d231c0 100644 --- a/test/unit/org/apache/cassandra/db/compaction/CompactionSimulationTest.java +++ b/test/unit/org/apache/cassandra/db/compaction/CompactionSimulationTest.java @@ -410,7 +410,6 @@ private UnifiedCompactionStrategy createUnifiedCompactionStrategy(Counters count Reservations.Type.PER_LEVEL, overlapInclusionMethod, true, - false, updateTimeSec, minW, maxW, @@ -438,7 +437,6 @@ private UnifiedCompactionStrategy createUnifiedCompactionStrategy(Counters count Reservations.Type.PER_LEVEL, overlapInclusionMethod, true, - false, "ks", "tbl"); diff --git a/test/unit/org/apache/cassandra/db/compaction/unified/AdaptiveControllerTest.java b/test/unit/org/apache/cassandra/db/compaction/unified/AdaptiveControllerTest.java index 41188dc5ba76..2ecefd5d537c 100644 --- a/test/unit/org/apache/cassandra/db/compaction/unified/AdaptiveControllerTest.java +++ b/test/unit/org/apache/cassandra/db/compaction/unified/AdaptiveControllerTest.java @@ -86,7 +86,6 @@ private AdaptiveController makeController(long dataSizeGB, int numShards, long s Controller.DEFAULT_RESERVED_THREADS_TYPE, Controller.DEFAULT_OVERLAP_INCLUSION_METHOD, true, - false, interval, minW, maxW, diff --git a/test/unit/org/apache/cassandra/db/compaction/unified/ControllerTest.java b/test/unit/org/apache/cassandra/db/compaction/unified/ControllerTest.java index 400931cfa09f..a52aaebf45c2 100644 --- a/test/unit/org/apache/cassandra/db/compaction/unified/ControllerTest.java +++ b/test/unit/org/apache/cassandra/db/compaction/unified/ControllerTest.java @@ -106,7 +106,6 @@ public abstract class ControllerTest protected String keyspaceName = "TestKeyspace"; protected int numDirectories = 1; - protected boolean useVector = false; @BeforeClass public static void setUpClass() @@ -136,8 +135,6 @@ public void setUp() when(executorService.scheduleAtFixedRate(any(Runnable.class), anyLong(), anyLong(), any(TimeUnit.class))).thenReturn(fut); when(env.flushSize()).thenReturn((double) (sstableSizeMB << 20)); - when(cfs.metadata()).thenReturn(metadata); - when(metadata.hasVectorType()).thenAnswer(invocation -> useVector); } Controller testFromOptions(boolean adaptive, Map options) @@ -172,25 +169,6 @@ Controller testFromOptions(boolean adaptive, Map options) return controller; } - Controller testFromOptionsVector(boolean adaptive, Map options) - { - useVector = true; - addOptions(adaptive, options); - Controller.validateOptions(options); - - Controller controller = Controller.fromOptions(cfs, options); - assertNotNull(controller); - assertNotNull(controller.toString()); - - assertEquals(dataSizeGB << 30, controller.getDataSetSizeBytes()); - assertFalse(controller.isRunning()); - for (int i = 0; i < 5; i++) // simulate 5 levels - assertEquals(Controller.DEFAULT_SURVIVAL_FACTOR, controller.getSurvivalFactor(i), epsilon); - assertNull(controller.getCalculator()); - - return controller; - } - void testValidateOptions(Map options, boolean adaptive) { addOptions(adaptive, options); diff --git a/test/unit/org/apache/cassandra/db/compaction/unified/StaticControllerTest.java b/test/unit/org/apache/cassandra/db/compaction/unified/StaticControllerTest.java index f20511f0390c..9c786de7771d 100644 --- a/test/unit/org/apache/cassandra/db/compaction/unified/StaticControllerTest.java +++ b/test/unit/org/apache/cassandra/db/compaction/unified/StaticControllerTest.java @@ -29,12 +29,11 @@ import org.apache.cassandra.exceptions.ConfigurationException; import org.apache.cassandra.locator.ReplicationFactor; import org.apache.cassandra.schema.SchemaConstants; -import org.apache.cassandra.utils.FBUtilities; +import org.apache.cassandra.utils.Overlaps; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThrows; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import static org.mockito.Mockito.when; @@ -42,13 +41,6 @@ public class StaticControllerTest extends ControllerTest { static final int[] Ws = new int[] { 30, 2, 0, -6}; - static final int[] VectorWs = new int[] {-8, -8, -8, -8}; - static final int vectorBaseShardCount = 1; - static final double vectorSstableGrowthModifier = 1; - static final int vectorReservedThreads = Integer.MAX_VALUE; - static final int vectorScalingParameter = -8; - static final String vectorMinSSTableSize = "1024MiB"; - static final String vectorTargetSSTableSize = "5GiB"; @Test public void testFromOptions() @@ -74,17 +66,6 @@ private static void addOptions(boolean useIntegers, Map options) options.put(Controller.SSTABLE_GROWTH_OPTION, "0"); } - private static void addVectorOptions(Map options) - { - options.put(Controller.VECTOR_BASE_SHARD_COUNT_OPTION, String.valueOf(vectorBaseShardCount)); - options.put(Controller.VECTOR_SSTABLE_GROWTH_OPTION, String.valueOf(vectorSstableGrowthModifier)); - options.put(Controller.VECTOR_RESERVED_THREADS_OPTION, String.valueOf(vectorReservedThreads)); - options.put(Controller.VECTOR_SCALING_PARAMETERS_OPTION, String.valueOf(vectorScalingParameter)); - options.put(Controller.VECTOR_MIN_SSTABLE_SIZE_OPTION, vectorMinSSTableSize); - options.put(Controller.VECTOR_TARGET_SSTABLE_SIZE_OPTION, vectorTargetSSTableSize); - options.put(Controller.OVERRIDE_UCS_CONFIG_FOR_VECTOR_TABLES_OPTION, String.valueOf(true)); - } - @Test public void testFromOptionsIntegers() { @@ -119,32 +100,6 @@ public void testFromOptionsIntegersDeprecatedName() assertEquals(Ws[Ws.length-1], controller.getScalingParameter(Ws.length)); } - @Test - public void testFromOptionsVectorTable() - { - Map options = new HashMap<>(); - addOptions(false, options); - addVectorOptions(options); - - Controller controller = testFromOptions(false, options); - assertTrue(controller instanceof StaticController); - - for (int i = 0; i < Ws.length; i++) - assertEquals(Ws[i], controller.getScalingParameter(i)); - - assertEquals(Ws[Ws.length-1], controller.getScalingParameter(Ws.length)); - - controller = testFromOptionsVector(false, options); - - assertEquals(vectorBaseShardCount, controller.baseShardCount); - assertEquals(vectorSstableGrowthModifier, controller.sstableGrowthModifier, 0.01); - assertEquals(FBUtilities.parseHumanReadableBytes(vectorMinSSTableSize), controller.minSSTableSize); - assertEquals(vectorReservedThreads, controller.getReservedThreads()); - assertEquals(FBUtilities.parseHumanReadableBytes(vectorTargetSSTableSize), controller.getTargetSSTableSize()); - for (int i = 0; i < Ws.length; i++) - assertEquals(vectorScalingParameter, controller.getScalingParameter(i)); - } - @Test public void testValidateOptions() { @@ -154,29 +109,6 @@ public void testValidateOptions() super.testValidateOptions(options, false); } - @Test - public void testValidateVectorOptions() - { - Map options = new HashMap<>(); - options.put(Controller.VECTOR_BASE_SHARD_COUNT_OPTION, "-1"); - assertThrows(ConfigurationException.class, () -> Controller.validateOptions(options)); - options.clear(); - options.put(Controller.VECTOR_SSTABLE_GROWTH_OPTION, "-1"); - assertThrows(ConfigurationException.class, () -> Controller.validateOptions(options)); - options.clear(); - options.put(Controller.VECTOR_RESERVED_THREADS_OPTION, "-1"); - assertThrows(ConfigurationException.class, () -> Controller.validateOptions(options)); - options.clear(); - options.put(Controller.VECTOR_MIN_SSTABLE_SIZE_OPTION, "10GiB"); - assertThrows(ConfigurationException.class, () -> Controller.validateOptions(options)); - options.clear(); - options.put(Controller.VECTOR_TARGET_SSTABLE_SIZE_OPTION, "-1MiB"); - assertThrows(ConfigurationException.class, () -> Controller.validateOptions(options)); - options.clear(); - options.put(Controller.OVERRIDE_UCS_CONFIG_FOR_VECTOR_TABLES_OPTION, "not true"); - assertThrows(ConfigurationException.class, () -> Controller.validateOptions(options)); - } - @Test public void testValidateOptionsIntegers() { @@ -251,7 +183,6 @@ public void testStartShutdown() Controller.DEFAULT_RESERVED_THREADS_TYPE, Controller.DEFAULT_OVERLAP_INCLUSION_METHOD, true, - false, keyspaceName, tableName); super.testStartShutdown(controller); @@ -270,7 +201,7 @@ public void testShutdownNotStarted() Controller.DEFAULT_MAX_SPACE_OVERHEAD, 0, Controller.DEFAULT_EXPIRED_SSTABLE_CHECK_FREQUENCY_SECONDS, - Controller.DEFAULT_ALLOW_UNSAFE_AGGRESSIVE_SSTABLE_EXPIRATION, + Controller.ALLOW_UNSAFE_AGGRESSIVE_SSTABLE_EXPIRATION, numShards, false, sstableSizeMB << 20, @@ -279,7 +210,6 @@ public void testShutdownNotStarted() Controller.DEFAULT_RESERVED_THREADS_TYPE, Controller.DEFAULT_OVERLAP_INCLUSION_METHOD, true, - false, keyspaceName, tableName); super.testShutdownNotStarted(controller); @@ -298,7 +228,7 @@ public void testStartAlreadyStarted() Controller.DEFAULT_MAX_SPACE_OVERHEAD, 0, Controller.DEFAULT_EXPIRED_SSTABLE_CHECK_FREQUENCY_SECONDS, - Controller.DEFAULT_ALLOW_UNSAFE_AGGRESSIVE_SSTABLE_EXPIRATION, + Controller.ALLOW_UNSAFE_AGGRESSIVE_SSTABLE_EXPIRATION, numShards, false, sstableSizeMB << 20, @@ -307,7 +237,6 @@ public void testStartAlreadyStarted() Controller.DEFAULT_RESERVED_THREADS_TYPE, Controller.DEFAULT_OVERLAP_INCLUSION_METHOD, true, - false, keyspaceName, tableName); super.testStartAlreadyStarted(controller);