Skip to content
Permalink
Browse files
Fix repair_request_timeout_in_ms and remove paxos_auto_repair_thresho…
…ld_mb

patch by Benedict Elliott Smith and Ekaterina Dimitrova; reviewed by Benedict Elliott Smith and Blake Eggleston for CASSANDRA-17557
  • Loading branch information
ekaterinadimitrova2 committed May 11, 2022
1 parent 89fbb1a commit f57c8d2c25f3a7c2b845ad9205ad25a9b04cca34
Showing 6 changed files with 44 additions and 89 deletions.
@@ -1,4 +1,5 @@
4.1
* Fix repair_request_timeout_in_ms and remove paxos_auto_repair_threshold_mb (CASSANDRA-17557)
* Incremental repair leaks SomeRepairFailedException after switch away from flatMap (CASSANDRA-17620)
* StorageService read threshold get methods throw NullPointerException due to not handling null configs (CASSANDRA-17593)
* Rename truncate_drop guardrail to drop_truncate_table (CASSANDRA-17592)
@@ -145,7 +145,7 @@ public static Set<String> splitCommaDelimited(String src)
@Replaces(oldName = "truncate_request_timeout_in_ms", converter = Converters.MILLIS_DURATION_LONG, deprecated = true)
public volatile SmallestDurationMilliseconds truncate_request_timeout = new SmallestDurationMilliseconds("60000ms");

public volatile Long repair_request_timeout_in_ms = 120000L;
public volatile SmallestDurationMilliseconds repair_request_timeout = new SmallestDurationMilliseconds("120000ms");

public Integer streaming_connections_per_host = 1;
@Replaces(oldName = "streaming_keep_alive_period_in_secs", converter = Converters.SECONDS_DURATION, deprecated = true)
@@ -1026,12 +1026,6 @@ public static PaxosStatePurging fromBoolean(boolean enabled)
*/
public String paxos_contention_min_delta;

/**
* The amount of disk space paxos uncommitted key files can consume before we begin automatically scheduling paxos repairs.
* Note that these repairs are uncoordinated and so do not contribute to expunging system.paxos records.
*/
public volatile int paxos_auto_repair_threshold_mb = 32;

/**
* The number of keys we may simultaneously attempt to finish incomplete paxos operations for.
*/
@@ -774,12 +774,6 @@ else if (conf.repair_session_space.toMebibytes() > (int) (Runtime.getRuntime().m
+ conf.paxos_cache_size + "', supported values are <integer> >= 0.", false);
}

if (conf.paxos_auto_repair_threshold_mb < 0)
{
throw new ConfigurationException("paxos_auto_repair_threshold_mb option was set incorrectly to '"
+ conf.paxos_auto_repair_threshold_mb + "', supported values are <integer> >= 0.", false);
}

// if set to empty/"auto" then use 5% of Heap size
indexSummaryCapacityInMiB = (conf.index_summary_capacity == null)
? Math.max(1, (int) (Runtime.getRuntime().totalMemory() * 0.05 / 1024 / 1024))
@@ -1844,14 +1838,14 @@ public static void setTruncateRpcTimeout(long timeOutInMillis)
conf.truncate_request_timeout = SmallestDurationMilliseconds.inMilliseconds(timeOutInMillis);
}

public static long getRepairRpcTimeout()
public static long getRepairRpcTimeout(TimeUnit unit)
{
return conf.repair_request_timeout_in_ms;
return conf.repair_request_timeout.to(unit);
}

public static void setRepairRpcTimeout(Long timeOutInMillis)
{
conf.repair_request_timeout_in_ms = timeOutInMillis;
conf.repair_request_timeout = SmallestDurationMilliseconds.inMilliseconds(timeOutInMillis);
}

public static boolean hasCrossNodeTimeout()
@@ -2670,16 +2664,6 @@ public static boolean paxoTopologyRepairStrictEachQuorum()
return conf.paxos_topology_repair_strict_each_quorum;
}

public static int getPaxosAutoRepairThresholdMB()
{
return conf.paxos_auto_repair_threshold_mb;
}

public static void setPaxosAutoRepairThresholdMB(int threshold)
{
conf.paxos_auto_repair_threshold_mb = threshold;
}

public static void setNativeTransportMaxRequestDataInFlightPerIpInBytes(long maxRequestDataInFlightInBytes)
{
if (maxRequestDataInFlightInBytes == -1)

0 comments on commit f57c8d2

Please sign in to comment.