Fix a mapping update issue when having a datacenter group
@@ -343,6 +343,7 @@ public class ClusterService extends BaseClusterService {
private final String selectOwnerMetadataQuery;
private final String initMetadataQuery;
private final String updateMetaDataQuery;
+ private final Pattern extensionKeyPattern;
private final SchemaManager schemaManager;
private final QueryManager queryManager;
@@ -368,7 +369,8 @@ public class ClusterService extends BaseClusterService {
} else {
elasticAdminKeyspaceName = ELASTIC_ADMIN_KEYSPACE;
}
- logger.info("Starting with elastic_admin keyspace=[{}]", elasticAdminKeyspaceName);
+ extensionKeyPattern = Pattern.compile(elasticAdminKeyspaceName + "(_[a-zA-Z0-9_\\-]+)?/.*");
+ logger.info("Starting with elastic_admin keyspace=[{}], CQL extension pattern=[{}]", elasticAdminKeyspaceName, extensionKeyPattern);
this.datacenterTags = SETTING_DATACENTER_TAGS.get(settings);
logger.info("Starting with datacenter.tags={}", datacenterTags);
@@ -897,7 +899,7 @@ public class ClusterService extends BaseClusterService {
}
}
- static Pattern extensionKeyPattern = Pattern.compile(ELASTIC_ADMIN_KEYSPACE + "(_[a-zA-Z0-9_\\-]+)?/.*");
+
public boolean isValidExtensionKey(String extensionName) {
if (extensionName == null)
