mirror of https://github.com/apache/cassandra
Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0: Enforce metric naming contract if scope is used in a metric name
This commit is contained in:
commit
6bae4f76fb
|
|
@ -40,6 +40,7 @@
|
|||
* Add the ability to disable bulk loading of SSTables (CASSANDRA-18781)
|
||||
* Clean up obsolete functions and simplify cql_version handling in cqlsh (CASSANDRA-18787)
|
||||
Merged from 5.0:
|
||||
* Enforce metric naming contract if scope is used in a metric name (CASSANDRA-19619)
|
||||
* Avoid reading of the same IndexInfo from disk many times for a large partition (CASSANDRA-19557)
|
||||
* Resolve the oldest hints just from descriptors and current writer if available (CASSANDRA-19600)
|
||||
* Optionally fail writes when SAI refuses to index a term value exceeding configured term max size (CASSANDRA-19493)
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ public abstract class AbstractMetrics
|
|||
return new CassandraMetricsRegistry.MetricName(DefaultNameFactory.GROUP_NAME,
|
||||
TYPE,
|
||||
name,
|
||||
MetricRegistry.name(keyspace, table, index, scope, name),
|
||||
MetricRegistry.name(keyspace, table, index, scope),
|
||||
createMBeanName(name, scope));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1065,6 +1065,11 @@ public class CassandraMetricsRegistry extends MetricRegistry
|
|||
{
|
||||
throw new IllegalArgumentException("Name needs to be specified");
|
||||
}
|
||||
if (scope != null && scope.contains(name))
|
||||
{
|
||||
throw new IllegalArgumentException("Scope cannot contain name, this is not neccessary and will cause performance issues. " +
|
||||
"Scope: " + scope + " Name: " + name);
|
||||
}
|
||||
this.group = group;
|
||||
this.type = type;
|
||||
this.name = name;
|
||||
|
|
|
|||
Loading…
Reference in New Issue