mirror of https://github.com/apache/cassandra
Merge branch 'cassandra-3.0' into cassandra-3.9
This commit is contained in:
commit
76188e9520
|
|
@ -1051,6 +1051,12 @@ inter_dc_tcp_nodelay: false
|
|||
tracetype_query_ttl: 86400
|
||||
tracetype_repair_ttl: 604800
|
||||
|
||||
# By default, Cassandra logs GC Pauses greater than 200 ms at INFO level
|
||||
# This threshold can be adjusted to minimize logging if necessary
|
||||
# gc_log_threshold_in_ms: 200
|
||||
|
||||
# If unset, all GC Pauses greater than gc_log_threshold_in_ms will log at
|
||||
# INFO level
|
||||
# UDFs (user defined functions) are disabled by default.
|
||||
# As of Cassandra 3.0 there is a sandbox in place that should prevent execution of evil code.
|
||||
enable_user_defined_functions: false
|
||||
|
|
|
|||
|
|
@ -276,6 +276,7 @@ public class Config
|
|||
public volatile Long index_summary_capacity_in_mb;
|
||||
public volatile int index_summary_resize_interval_in_minutes = 60;
|
||||
|
||||
public int gc_log_threshold_in_ms = 200;
|
||||
public int gc_warn_threshold_in_ms = 0;
|
||||
|
||||
// TTL for different types of trace events.
|
||||
|
|
|
|||
|
|
@ -385,6 +385,11 @@ public class DatabaseDescriptor
|
|||
}
|
||||
paritionerName = partitioner.getClass().getCanonicalName();
|
||||
|
||||
if (config.gc_log_threshold_in_ms < 0)
|
||||
{
|
||||
throw new ConfigurationException("gc_log_threshold_in_ms must be a positive integer");
|
||||
}
|
||||
|
||||
if (conf.gc_warn_threshold_in_ms < 0)
|
||||
{
|
||||
throw new ConfigurationException("gc_warn_threshold_in_ms must be a positive integer");
|
||||
|
|
@ -2169,6 +2174,11 @@ public class DatabaseDescriptor
|
|||
conf.user_function_timeout_policy = userFunctionTimeoutPolicy;
|
||||
}
|
||||
|
||||
public static long getGCLogThreshold()
|
||||
{
|
||||
return conf.gc_log_threshold_in_ms;
|
||||
}
|
||||
|
||||
public static EncryptionContext getEncryptionContext()
|
||||
{
|
||||
return encryptionContext;
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ public class GCInspector implements NotificationListener, GCInspectorMXBean
|
|||
{
|
||||
public static final String MBEAN_NAME = "org.apache.cassandra.service:type=GCInspector";
|
||||
private static final Logger logger = LoggerFactory.getLogger(GCInspector.class);
|
||||
final static long MIN_LOG_DURATION = 200;
|
||||
final static long MIN_LOG_DURATION = DatabaseDescriptor.getGCLogThreshold();
|
||||
final static long GC_WARN_THRESHOLD_IN_MS = DatabaseDescriptor.getGCWarnThreshold();
|
||||
final static long STAT_THRESHOLD = GC_WARN_THRESHOLD_IN_MS != 0 ? GC_WARN_THRESHOLD_IN_MS : MIN_LOG_DURATION;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue