diff --git a/docker/Dockerfile b/docker/Dockerfile
index 38fe9c79e..44fc98afb 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -1,4 +1,4 @@
-FROM polardbx/polardbxbasejava:20221129
+FROM polardbx-opensource-registry.cn-beijing.cr.aliyuncs.com/polardbx/polardbxbasejava:20221129
WORKDIR /home/admin
diff --git a/polardbx-calcite/pom.xml b/polardbx-calcite/pom.xml
index dd15cd601..9eede5d3f 100644
--- a/polardbx-calcite/pom.xml
+++ b/polardbx-calcite/pom.xml
@@ -39,6 +39,12 @@ limitations under the License.
org.apache.calcite.avaticaavatica-core${avatica.core.version}
+
+
+ org.apache.httpcomponents
+ httpcore
+
+ org.apache.calcite
@@ -51,11 +57,6 @@ limitations under the License.
${avatica-serve.version}test
-
- commons-dbcp
- commons-dbcp
- ${commons-dbcp.version}
- org.apache.commonscommons-lang3
@@ -95,6 +96,7 @@ limitations under the License.
com.yahoo.datasketchessketches-core${sketches-core.version}
+ providedjunit
@@ -164,17 +166,20 @@ limitations under the License.
9.3-1102-jdbc3test
-
- org.slf4j
- slf4j-api
- compile
-
-
-
- org.slf4j
- slf4j-log4j12
- test
-
+
+
+ ch.qos.logback
+ logback-classic
+
+
+ org.slf4j
+ slf4j-api
+ ${slf4j_version}
+
+
+ org.slf4j
+ log4j-over-slf4j
+ sqlline
@@ -203,6 +208,11 @@ limitations under the License.
${mockito.verison}test
+
+ com.alibaba.polardbx
+ polardbx-net
+ ${parent.version}
+
@@ -302,24 +312,6 @@ limitations under the License.
-
-
- org.apache.maven.plugins
- maven-source-plugin
-
-
- attach-sources
- verify
-
- jar-no-fork
- test-jar-no-fork
-
-
-
- org.apache.maven.pluginsmaven-dependency-plugin
diff --git a/polardbx-calcite/src/main/java/org/apache/calcite/adapter/jdbc/JdbcSchema.java b/polardbx-calcite/src/main/java/org/apache/calcite/adapter/jdbc/JdbcSchema.java
index 8e7ecdfac..b44e6145a 100644
--- a/polardbx-calcite/src/main/java/org/apache/calcite/adapter/jdbc/JdbcSchema.java
+++ b/polardbx-calcite/src/main/java/org/apache/calcite/adapter/jdbc/JdbcSchema.java
@@ -16,6 +16,11 @@
*/
package org.apache.calcite.adapter.jdbc;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableMultimap;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Multimap;
import org.apache.calcite.avatica.AvaticaUtils;
import org.apache.calcite.avatica.SqlType;
import org.apache.calcite.linq4j.tree.Expression;
@@ -38,12 +43,7 @@
import org.apache.calcite.sql.type.SqlTypeName;
import org.apache.calcite.util.Util;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableMultimap;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Multimap;
-
+import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.ResultSet;
@@ -53,7 +53,6 @@
import java.util.Locale;
import java.util.Map;
import java.util.Set;
-import javax.sql.DataSource;
/**
* Implementation of {@link Schema} that is backed by a JDBC data source.
@@ -186,12 +185,7 @@ public static SqlDialect createDialect(SqlDialectFactory dialectFactory,
/** Creates a JDBC data source with the given specification. */
public static DataSource dataSource(String url, String driverClassName,
String username, String password) {
- if (url.startsWith("jdbc:hsqldb:")) {
- // Prevent hsqldb from screwing up java.util.logging.
- System.setProperty("hsqldb.reconfig_logging", "false");
- }
- return JdbcUtils.DataSourcePool.INSTANCE.get(url, driverClassName, username,
- password);
+ throw new IllegalAccessError();
}
public boolean isMutable() {
diff --git a/polardbx-calcite/src/main/java/org/apache/calcite/adapter/jdbc/JdbcUtils.java b/polardbx-calcite/src/main/java/org/apache/calcite/adapter/jdbc/JdbcUtils.java
index 0fe1761a4..a2359ed10 100644
--- a/polardbx-calcite/src/main/java/org/apache/calcite/adapter/jdbc/JdbcUtils.java
+++ b/polardbx-calcite/src/main/java/org/apache/calcite/adapter/jdbc/JdbcUtils.java
@@ -16,23 +16,17 @@
*/
package org.apache.calcite.adapter.jdbc;
+import com.google.common.collect.ImmutableList;
+import com.google.common.primitives.Ints;
import org.apache.calcite.avatica.ColumnMetaData;
import org.apache.calcite.avatica.util.DateTimeUtils;
import org.apache.calcite.linq4j.function.Function0;
import org.apache.calcite.linq4j.function.Function1;
import org.apache.calcite.sql.SqlDialect;
import org.apache.calcite.sql.SqlDialectFactory;
-import org.apache.calcite.util.ImmutableNullableList;
import org.apache.calcite.util.Pair;
-import org.apache.commons.dbcp.BasicDataSource;
-
-import com.google.common.cache.CacheBuilder;
-import com.google.common.cache.CacheLoader;
-import com.google.common.cache.LoadingCache;
-import com.google.common.collect.ImmutableList;
-import com.google.common.primitives.Ints;
-
+import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.Date;
@@ -46,193 +40,162 @@
import java.util.List;
import java.util.Map;
import java.util.TimeZone;
-import javax.annotation.Nonnull;
-import javax.sql.DataSource;
/**
* Utilities for the JDBC provider.
*/
final class JdbcUtils {
- private JdbcUtils() {
- throw new AssertionError("no instances!");
- }
-
- /** Pool of dialects. */
- static class DialectPool {
- final Map> map0 = new IdentityHashMap<>();
- final Map map = new HashMap<>();
-
- public static final DialectPool INSTANCE = new DialectPool();
-
- // TODO: Discuss why we need a pool. If we do, I'd like to improve performance
- synchronized SqlDialect get(SqlDialectFactory dialectFactory, DataSource dataSource) {
- Map dialectMap = map0.get(dataSource);
- if (dialectMap != null) {
- final SqlDialect sqlDialect = dialectMap.get(dialectFactory);
- if (sqlDialect != null) {
- return sqlDialect;
- }
- }
- Connection connection = null;
- try {
- connection = dataSource.getConnection();
- DatabaseMetaData metaData = connection.getMetaData();
- String productName = metaData.getDatabaseProductName();
- String productVersion = metaData.getDatabaseProductVersion();
- List key = ImmutableList.of(productName, productVersion, dialectFactory);
- SqlDialect dialect = map.get(key);
- if (dialect == null) {
- dialect = dialectFactory.create(metaData);
- map.put(key, dialect);
- if (dialectMap == null) {
- dialectMap = new IdentityHashMap<>();
- map0.put(dataSource, dialectMap);
- }
- dialectMap.put(dialectFactory, dialect);
- }
- connection.close();
- connection = null;
- return dialect;
- } catch (SQLException e) {
- throw new RuntimeException(e);
- } finally {
- if (connection != null) {
- try {
- connection.close();
- } catch (SQLException e) {
- // ignore
- }
- }
- }
- }
- }
-
- /** Builder that calls {@link ResultSet#getObject(int)} for every column,
- * or {@code getXxx} if the result type is a primitive {@code xxx},
- * and returns an array of objects for each row. */
- static class ObjectArrayRowBuilder implements Function0
-
-
+ -->
+
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/ArchiveMode.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/ArchiveMode.java
index c9fc9b6c2..4dcb6ac11 100644
--- a/polardbx-common/src/main/java/com/alibaba/polardbx/common/ArchiveMode.java
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/ArchiveMode.java
@@ -21,7 +21,8 @@
public enum ArchiveMode {
EMPTY,
TTL,
- LOADING;
+ LOADING,
+ ;
public static ArchiveMode of(String archiveMode) {
if (TStringUtil.isEmpty(archiveMode)) {
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/ColumnarOptions.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/ColumnarOptions.java
new file mode 100644
index 000000000..4ebb9933d
--- /dev/null
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/ColumnarOptions.java
@@ -0,0 +1,9 @@
+package com.alibaba.polardbx.common;
+
+public class ColumnarOptions {
+ public static final String DICTIONARY_COLUMNS = "DICTIONARY_COLUMNS";
+ public static final String TYPE = "TYPE";
+ public static final String SNAPSHOT_RETENTION_DAYS = "SNAPSHOT_RETENTION_DAYS";
+ public static final String AUTO_GEN_COLUMNAR_SNAPSHOT_INTERVAL = "AUTO_GEN_COLUMNAR_SNAPSHOT_INTERVAL";
+ public static final String COLUMNAR_PURGE_SAVE_MS = "COLUMNAR_PURGE_SAVE_MS";
+}
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/ColumnarTableOptions.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/ColumnarTableOptions.java
index cee81209c..8728ec83e 100644
--- a/polardbx-common/src/main/java/com/alibaba/polardbx/common/ColumnarTableOptions.java
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/ColumnarTableOptions.java
@@ -18,4 +18,9 @@
public class ColumnarTableOptions {
public static final String DICTIONARY_COLUMNS = "DICTIONARY_COLUMNS";
+ public static final String TYPE = "type";
+ public static final String SNAPSHOT_RETENTION_DAYS = "snapshot_retention_days";
+ public static final String DEFAULT_SNAPSHOT_RETENTION_DAYS = "7";
+ public static final String AUTO_GEN_COLUMNAR_SNAPSHOT_INTERVAL = "auto_gen_columnar_snapshot_interval";
+ public static final String DEFAULT_AUTO_GEN_COLUMNAR_SNAPSHOT_INTERVAL = "30";
}
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/Engine.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/Engine.java
index 21639977a..0fe0a6949 100644
--- a/polardbx-common/src/main/java/com/alibaba/polardbx/common/Engine.java
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/Engine.java
@@ -35,7 +35,8 @@ public enum Engine {
ABS,
OSS,
NFS,
- MEMORY;
+ MEMORY,
+ COLUMNAR;
public static final Engine DEFAULT_COLUMNAR_ENGINE = OSS;
@@ -94,6 +95,7 @@ public static boolean supportColumnar(Engine engine) {
case NFS:
case S3:
case ABS:
+ case COLUMNAR:
return true;
default:
return false;
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/IInnerConnection.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/IInnerConnection.java
index 57fd1e89e..843519309 100644
--- a/polardbx-common/src/main/java/com/alibaba/polardbx/common/IInnerConnection.java
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/IInnerConnection.java
@@ -18,9 +18,10 @@
import com.alibaba.polardbx.common.jdbc.ITransactionPolicy;
+import java.sql.Connection;
import java.util.function.Consumer;
-public interface IInnerConnection {
+public interface IInnerConnection extends Connection {
ITransactionPolicy getTrxPolicy();
void setTrxPolicy(ITransactionPolicy trxPolicy);
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/IInnerConnectionManager.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/IInnerConnectionManager.java
index 798c4fe70..628590cf3 100644
--- a/polardbx-common/src/main/java/com/alibaba/polardbx/common/IInnerConnectionManager.java
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/IInnerConnectionManager.java
@@ -20,7 +20,7 @@
import java.sql.SQLException;
public interface IInnerConnectionManager {
- Connection getConnection() throws SQLException;
+ IInnerConnection getConnection() throws SQLException;
- Connection getConnection(String schema) throws SQLException;
+ IInnerConnection getConnection(String schema) throws SQLException;
}
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/MergedStorageInfo.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/MergedStorageInfo.java
new file mode 100644
index 000000000..462702ddf
--- /dev/null
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/MergedStorageInfo.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.alibaba.polardbx.common;
+
+import lombok.Getter;
+import lombok.RequiredArgsConstructor;
+
+@Getter
+@RequiredArgsConstructor
+public class MergedStorageInfo {
+ private final boolean supportXA;
+ private final boolean supportTso;
+ private final boolean supportPurgeTso;
+ private final boolean supportTsoHeartbeat;
+ private final boolean supportCtsTransaction;
+ private final boolean supportAsyncCommit;
+ private final boolean supportLizard1PCTransaction;
+ private final boolean supportDeadlockDetection;
+ private final boolean supportMdlDeadlockDetection;
+ private final boolean supportsBloomFilter;
+ private final boolean supportOpenSSL;
+ private final boolean supportSharedReadView;
+ private final boolean supportsReturning;
+ private final boolean supportsBackfillReturning;
+ private final boolean supportsAlterType;
+ private final boolean readOnly;
+ private final boolean lowerCaseTableNames;
+ private final boolean supportHyperLogLog;
+ private final boolean lessMy56Version;
+ private final boolean supportXxHash;
+ private final boolean isMysql80;
+
+ /**
+ * FastChecker: generate checksum on xdb node
+ * Since: 5.4.13 fix
+ * Requirement: XDB supports HASHCHECK function
+ */
+ private final boolean supportFastChecker;
+
+ private final boolean supportChangeSet;
+
+ private final boolean supportXOptForAutoSp;
+
+ private final boolean supportXRpc;
+
+ private final boolean supportMarkDistributed;
+
+ private final boolean supportXOptForPhysicalBackfill;
+
+ private final boolean supportSyncPoint;
+
+ private final boolean supportFlashbackArea;
+}
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/TddlConstants.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/TddlConstants.java
index 99ca31c9a..7aae53ce2 100644
--- a/polardbx-common/src/main/java/com/alibaba/polardbx/common/TddlConstants.java
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/TddlConstants.java
@@ -16,6 +16,11 @@
package com.alibaba.polardbx.common;
+/**
+ * The key differentiator between variables in the {@TddlConstants} class
+ * and those in the {@ConnectionProperties} class is that the former are not
+ * eligible for configuration through set instructions.
+ */
public class TddlConstants {
public static final long DEFAULT_TABLE_META_EXPIRE_TIME = 300 * 1000;
@@ -88,4 +93,10 @@ public class TddlConstants {
public static final String BLACK_LIST_CONF = "BLACK_LIST_CONF";
public static final String ENABLE_JAVA_UDF = "ENABLE_JAVA_UDF";
+
+ public static final String ENABLE_SELECT_INTO_OUTFILE = "ENABLE_SELECT_INTO_OUTFILE";
+
+ public static final String ENABLE_LOAD_DATA_FILE = "ENABLE_LOAD_DATA_FILE";
+
+ public static final String ENABLE_STRICT_SET_GLOBAL = "ENABLE_STRICT_SET_GLOBAL";
}
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/cdc/CdcDDLContext.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/cdc/CdcDDLContext.java
index 2a8fcf344..921ad8c9b 100644
--- a/polardbx-common/src/main/java/com/alibaba/polardbx/common/cdc/CdcDDLContext.java
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/cdc/CdcDDLContext.java
@@ -65,5 +65,12 @@ public class CdcDDLContext {
private final Map> newTableTopology;
private final Pair tablesExtInfoPair;
- private Long versionId;
+ private final Long versionId;
+ /**
+ * 提交的tso结果,加了CDC_MARK_RECORD_COMMIT_TSO标记并成功执行才会存储
+ */
+
+ private Long commitTso;
+
+ private boolean sequenceDdl;
}
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/cdc/CdcManagerHelper.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/cdc/CdcManagerHelper.java
index 5aa62b859..258b6e243 100644
--- a/polardbx-common/src/main/java/com/alibaba/polardbx/common/cdc/CdcManagerHelper.java
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/cdc/CdcManagerHelper.java
@@ -61,7 +61,7 @@ public void notifyDdl(String schemaName, String tableName, String sqlKind, Strin
Long jobId = job == null ? null : job.getId();
DdlType ddlType = job == null ? null : typeTransfer(job.getType());
CdcDDLContext context = new CdcDDLContext(schemaName, tableName, sqlKind, ddlSql, visibility, jobId, null,
- ddlType, false, extendParams, job, false, null, null);
+ ddlType, false, extendParams, job, false, null, null, null, null, false);
cdcManager.notifyDdl(context);
}
@@ -73,7 +73,17 @@ public void notifyDdlNew(String schemaName, String tableName, String sqlKind, St
CdcDdlMarkVisibility visibility,
Map extendParams) {
CdcDDLContext context = new CdcDDLContext(schemaName, tableName, sqlKind, ddlSql, visibility, jobId, taskId,
- ddlType, true, extendParams, null, false, null, null);
+ ddlType, true, extendParams, null, false, null, null, null, null, false);
+ cdcManager.notifyDdl(context);
+ }
+
+ public void notifySequenceDdl(String schemaName, String tableName, String sqlKind, String ddlSql, DdlType ddlType,
+ Long jobId,
+ Long taskId,
+ CdcDdlMarkVisibility visibility,
+ Map extendParams) {
+ CdcDDLContext context = new CdcDDLContext(schemaName, tableName, sqlKind, ddlSql, visibility, jobId, taskId,
+ ddlType, true, extendParams, null, false, null, null, null, null, true);
cdcManager.notifyDdl(context);
}
@@ -132,7 +142,7 @@ public void notifyDdlNew(String schemaName, String tableName, String sqlKind, St
Long jobId, Long taskId, CdcDdlMarkVisibility visibility, Map extendParams,
boolean isRefreshTableMetaInfo, Map> newTableTopology) {
CdcDDLContext context = new CdcDDLContext(schemaName, tableName, sqlKind, ddlSql, visibility, jobId, taskId,
- ddlType, true, extendParams, null, isRefreshTableMetaInfo, newTableTopology, null);
+ ddlType, true, extendParams, null, isRefreshTableMetaInfo, newTableTopology, null, null, null, false);
cdcManager.notifyDdl(context);
}
@@ -142,7 +152,8 @@ public void notifyDdlNew(String schemaName, String tableName, String sqlKind, St
boolean isRefreshTableMetaInfo, Map> newTableTopology,
Pair cdcMetaPair) {
CdcDDLContext context = new CdcDDLContext(schemaName, tableName, sqlKind, ddlSql, visibility, jobId, taskId,
- ddlType, true, extendParams, null, isRefreshTableMetaInfo, newTableTopology, cdcMetaPair);
+ ddlType, true, extendParams, null, isRefreshTableMetaInfo, newTableTopology, cdcMetaPair, null, null,
+ false);
cdcManager.notifyDdl(context);
}
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/cdc/ICdcManager.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/cdc/ICdcManager.java
index fbead4d47..d6017b0b4 100644
--- a/polardbx-common/src/main/java/com/alibaba/polardbx/common/cdc/ICdcManager.java
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/cdc/ICdcManager.java
@@ -64,14 +64,17 @@ public interface ICdcManager {
String CDC_ORIGINAL_DDL = "original_ddl";
String CDC_IS_GSI = "CDC_IS_GSI";
+ String CDC_IS_CCI = "CDC_IS_CCI";
String CDC_GSI_PRIMARY_TABLE = "CDC_GSI_PRIMARY_TABLE";
String CDC_GROUP_NAME = "cdc_group_name";
String CDC_ACTUAL_ALTER_TABLE_GROUP_FLAG = "cdc_actual_alter_table_group_flag";
String CDC_TABLE_GROUP_MANUAL_CREATE_FLAG = "cdc_table_group_manual_create_flag";
String CDC_DDL_SCOPE = "cdc_ddl_scope";
String POLARDBX_SERVER_ID = "polardbx_server_id";
+ String SQL_LOG_BIN = "sql_log_bin";
String DDL_ID = "DDL_ID";
String EXCHANGE_NAMES_MAPPING = "EXCHANGE_NAMES_MAPPING";
+ String CDC_MARK_RECORD_COMMIT_TSO = "cdc_mark_record_commit_tso";
/**
* 发送Cdc通用指令
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/cdc/RplConstants.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/cdc/RplConstants.java
index aa2c3cc9f..64e7aa95f 100644
--- a/polardbx-common/src/main/java/com/alibaba/polardbx/common/cdc/RplConstants.java
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/cdc/RplConstants.java
@@ -31,4 +31,6 @@ public class RplConstants {
public static final String RPL_FULL_VALID_DB = "dbName";
public static final String RPL_FULL_VALID_TB = "tbName";
+
+ public static final String RPL_FULL_VALID_MODE = "mode";
}
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/cdc/entity/DDLExtInfo.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/cdc/entity/DDLExtInfo.java
index 5b7d24cd7..756cc998b 100644
--- a/polardbx-common/src/main/java/com/alibaba/polardbx/common/cdc/entity/DDLExtInfo.java
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/cdc/entity/DDLExtInfo.java
@@ -19,6 +19,9 @@
import com.alibaba.polardbx.common.cdc.DdlScope;
import lombok.Getter;
+import java.util.HashMap;
+import java.util.Map;
+
/**
* Created by ziyang.lb
**/
@@ -52,6 +55,7 @@ public class DDLExtInfo {
private String sqlMode = null;
private String originalDdl = null;
private Boolean isGsi = false;
+ private Boolean isCci = false;
private String groupName = null;
@Getter
private Boolean foreignKeysDdl = false;
@@ -64,6 +68,8 @@ public class DDLExtInfo {
@Getter
private Long ddlId;
+ private Map polarxVariables = new HashMap<>();
+
public Long getTaskId() {
return taskId;
}
@@ -128,6 +134,14 @@ public void setGsi(Boolean gsi) {
isGsi = gsi;
}
+ public Boolean getCci() {
+ return isCci;
+ }
+
+ public void setCci(Boolean cci) {
+ isCci = cci;
+ }
+
public String getGroupName() {
return groupName;
}
@@ -171,4 +185,12 @@ public void setEnableImplicitTableGroup(boolean enableImplicitTableGroup) {
public void setDdlId(Long ddlId) {
this.ddlId = ddlId;
}
+
+ public Map getPolarxVariables() {
+ return polarxVariables;
+ }
+
+ public void addPolarxVariable(String key, Object value) {
+ this.polarxVariables.put(key, value);
+ }
}
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/charset/CollationName.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/charset/CollationName.java
index ae9e8574d..4b56bc67a 100644
--- a/polardbx-common/src/main/java/com/alibaba/polardbx/common/charset/CollationName.java
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/charset/CollationName.java
@@ -640,6 +640,9 @@ public static CollationName defaultNumericCollation() {
.put(new MixCollationKey(UTF8_BIN, LATIN1_SPANISH_CI), UTF8_BIN)
.put(new MixCollationKey(UTF8_BIN, BIG5_BIN), UTF8_BIN)
.put(new MixCollationKey(UTF8_BIN, BIG5_CHINESE_CI), UTF8_BIN)
+ .put(new MixCollationKey(UTF8_BIN, UTF8_GENERAL_CI), UTF8_BIN)
+ .put(new MixCollationKey(UTF8_BIN, UTF8_UNICODE_CI), UTF8_BIN)
+ .put(new MixCollationKey(UTF8_BIN, UTF8_GENERAL_MYSQL500_CI), UTF8_BIN)
.put(new MixCollationKey(UTF8_UNICODE_CI, UTF8MB4_GENERAL_CI), UTF8MB4_GENERAL_CI)
.put(new MixCollationKey(UTF8_UNICODE_CI, UTF8MB4_BIN), UTF8MB4_BIN)
.put(new MixCollationKey(UTF8_UNICODE_CI, UTF8MB4_UNICODE_CI), UTF8MB4_UNICODE_CI)
@@ -683,7 +686,6 @@ public static CollationName defaultNumericCollation() {
.put(new MixCollationKey(UTF8MB4_GENERAL_CI, LATIN1_SPANISH_CI), UTF8MB4_GENERAL_CI)
.put(new MixCollationKey(UTF8MB4_GENERAL_CI, BIG5_BIN), UTF8MB4_GENERAL_CI)
.put(new MixCollationKey(UTF8MB4_GENERAL_CI, BIG5_CHINESE_CI), UTF8MB4_GENERAL_CI)
- .put(new MixCollationKey(UTF8MB4_BIN, UTF8MB4_GENERAL_CI), UTF8MB4_BIN)
.put(new MixCollationKey(UTF8MB4_BIN, UTF16LE_GENERAL_CI), UTF16LE_GENERAL_CI)
.put(new MixCollationKey(UTF8MB4_BIN, UTF16LE_BIN), UTF16LE_BIN)
.put(new MixCollationKey(UTF8MB4_BIN, ASCII_GENERAL_CI), UTF8MB4_BIN)
@@ -704,6 +706,11 @@ public static CollationName defaultNumericCollation() {
.put(new MixCollationKey(UTF8MB4_BIN, LATIN1_SPANISH_CI), UTF8MB4_BIN)
.put(new MixCollationKey(UTF8MB4_BIN, BIG5_BIN), UTF8MB4_BIN)
.put(new MixCollationKey(UTF8MB4_BIN, BIG5_CHINESE_CI), UTF8MB4_BIN)
+ .put(new MixCollationKey(UTF8MB4_BIN, UTF8MB4_GENERAL_CI), UTF8MB4_BIN)
+ .put(new MixCollationKey(UTF8MB4_BIN, UTF8MB4_UNICODE_CI), UTF8MB4_BIN)
+ .put(new MixCollationKey(UTF8MB4_BIN, UTF8MB4_UNICODE_520_CI), UTF8MB4_BIN)
+ .put(new MixCollationKey(UTF8MB4_BIN, UTF8MB4_0900_AI_CI), UTF8MB4_BIN)
+ .put(new MixCollationKey(UTF8MB4_BIN, UTF8MB4_ZH_0900_AS_CS), UTF8MB4_BIN)
.put(new MixCollationKey(UTF8MB4_UNICODE_CI, UTF16LE_GENERAL_CI), UTF16LE_GENERAL_CI)
.put(new MixCollationKey(UTF8MB4_UNICODE_CI, UTF16LE_BIN), UTF16LE_BIN)
.put(new MixCollationKey(UTF8MB4_UNICODE_CI, ASCII_GENERAL_CI), UTF8MB4_UNICODE_CI)
@@ -764,6 +771,8 @@ public static CollationName defaultNumericCollation() {
.put(new MixCollationKey(UTF16_BIN, LATIN1_SPANISH_CI), UTF16_BIN)
.put(new MixCollationKey(UTF16_BIN, BIG5_BIN), UTF16_BIN)
.put(new MixCollationKey(UTF16_BIN, BIG5_CHINESE_CI), UTF16_BIN)
+ .put(new MixCollationKey(UTF16_BIN, UTF16_GENERAL_CI), UTF16_BIN)
+ .put(new MixCollationKey(UTF16_BIN, UTF16_UNICODE_CI), UTF16_BIN)
.put(new MixCollationKey(UTF16_UNICODE_CI, UTF16LE_GENERAL_CI), UTF16LE_GENERAL_CI)
.put(new MixCollationKey(UTF16_UNICODE_CI, UTF16LE_BIN), UTF16LE_BIN)
.put(new MixCollationKey(UTF16_UNICODE_CI, ASCII_GENERAL_CI), UTF16_UNICODE_CI)
@@ -826,6 +835,7 @@ public static CollationName defaultNumericCollation() {
.put(new MixCollationKey(UTF16LE_BIN, LATIN1_SPANISH_CI), UTF16LE_BIN)
.put(new MixCollationKey(UTF16LE_BIN, BIG5_BIN), UTF16LE_BIN)
.put(new MixCollationKey(UTF16LE_BIN, BIG5_CHINESE_CI), UTF16LE_BIN)
+ .put(new MixCollationKey(UTF16LE_BIN, UTF16LE_GENERAL_CI), UTF16LE_BIN)
.put(new MixCollationKey(UTF32_GENERAL_CI, ASCII_GENERAL_CI), UTF32_GENERAL_CI)
.put(new MixCollationKey(UTF32_GENERAL_CI, ASCII_BIN), UTF32_GENERAL_CI)
.put(new MixCollationKey(UTF32_GENERAL_CI, BINARY), BINARY)
@@ -862,6 +872,8 @@ public static CollationName defaultNumericCollation() {
.put(new MixCollationKey(UTF32_BIN, LATIN1_SPANISH_CI), UTF32_BIN)
.put(new MixCollationKey(UTF32_BIN, BIG5_BIN), UTF32_BIN)
.put(new MixCollationKey(UTF32_BIN, BIG5_CHINESE_CI), UTF32_BIN)
+ .put(new MixCollationKey(UTF32_BIN, UTF32_GENERAL_CI), UTF32_BIN)
+ .put(new MixCollationKey(UTF32_BIN, UTF32_UNICODE_CI), UTF32_BIN)
.put(new MixCollationKey(UTF32_UNICODE_CI, ASCII_GENERAL_CI), UTF32_UNICODE_CI)
.put(new MixCollationKey(UTF32_UNICODE_CI, ASCII_BIN), UTF32_UNICODE_CI)
.put(new MixCollationKey(UTF32_UNICODE_CI, BINARY), BINARY)
@@ -901,7 +913,6 @@ public static CollationName defaultNumericCollation() {
// should be compatible with it.
.put(new MixCollationKey(UTF8MB4_0900_AI_CI, UTF8MB4_GENERAL_CI), UTF8MB4_0900_AI_CI)
.put(new MixCollationKey(UTF8MB4_0900_AI_CI, UTF8MB4_UNICODE_CI), UTF8MB4_0900_AI_CI)
- .put(new MixCollationKey(UTF8MB4_0900_AI_CI, UTF8MB4_BIN), UTF8MB4_BIN)
.put(new MixCollationKey(UTF8MB4_0900_AI_CI, UTF8_GENERAL_CI), UTF8MB4_0900_AI_CI)
.put(new MixCollationKey(UTF8MB4_0900_AI_CI, UTF8_BIN), UTF8MB4_0900_AI_CI)
.put(new MixCollationKey(UTF8MB4_0900_AI_CI, UTF8_UNICODE_CI), UTF8MB4_0900_AI_CI)
@@ -960,6 +971,18 @@ public static CollationName defaultNumericCollation() {
.put(new MixCollationKey(UTF8MB4_UNICODE_520_CI, LATIN1_SPANISH_CI), UTF8MB4_UNICODE_520_CI)
.put(new MixCollationKey(UTF8MB4_UNICODE_520_CI, BIG5_BIN), UTF8MB4_UNICODE_520_CI)
.put(new MixCollationKey(UTF8MB4_UNICODE_520_CI, BIG5_CHINESE_CI), UTF8MB4_UNICODE_520_CI)
+ .put(new MixCollationKey(LATIN1_BIN, LATIN1_SWEDISH_CI), LATIN1_BIN)
+ .put(new MixCollationKey(LATIN1_BIN, LATIN1_GERMAN1_CI), LATIN1_BIN)
+ .put(new MixCollationKey(LATIN1_BIN, LATIN1_DANISH_CI), LATIN1_BIN)
+ .put(new MixCollationKey(LATIN1_BIN, LATIN1_GERMAN2_CI), LATIN1_BIN)
+ .put(new MixCollationKey(LATIN1_BIN, LATIN1_GENERAL_CI), LATIN1_BIN)
+ .put(new MixCollationKey(LATIN1_BIN, LATIN1_GENERAL_CS), LATIN1_BIN)
+ .put(new MixCollationKey(LATIN1_BIN, LATIN1_SPANISH_CI), LATIN1_BIN)
+ .put(new MixCollationKey(GB18030_BIN, GB18030_UNICODE_520_CI), GB18030_BIN)
+ .put(new MixCollationKey(GB18030_BIN, GB18030_CHINESE_CI), GB18030_BIN)
+ .put(new MixCollationKey(ASCII_BIN, ASCII_GENERAL_CI), ASCII_BIN)
+ .put(new MixCollationKey(GBK_BIN, GBK_CHINESE_CI), GBK_BIN)
+ .put(new MixCollationKey(BIG5_BIN, BIG5_CHINESE_CI), BIG5_BIN)
.build();
private static class MixCollationKey {
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/columnar/ColumnarOption.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/columnar/ColumnarOption.java
new file mode 100644
index 000000000..fd29772c8
--- /dev/null
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/columnar/ColumnarOption.java
@@ -0,0 +1,89 @@
+package com.alibaba.polardbx.common.columnar;
+
+import com.alibaba.polardbx.common.exception.TddlRuntimeException;
+import com.alibaba.polardbx.common.exception.code.ErrorCode;
+
+import java.util.function.Consumer;
+
+/**
+ * @author yaozhili
+ */
+public class ColumnarOption {
+ private final String key;
+ private final String defaultValue;
+ private final String description;
+ private final Consumer setIndex;
+ private final Consumer setGlobal;
+ private final Consumer validator;
+
+ /**
+ * @param key option key
+ * @param defaultValue default value of this option
+ * @param description description of this option
+ * @param setIndex Define what will be done when an index option is set. An exception should be thrown if fails.
+ * Null means this option is immutable, and should be declared when index is created, and set index option is not supported.
+ * @param setGlobal Define what will be done when a global option is set. An exception should be thrown if fails.
+ * Null means set global option is not supported.
+ * @param validator Validate the setting value. Throw an exception if fail to validate.
+ */
+ public ColumnarOption(String key, String defaultValue, String description,
+ Consumer setIndex,
+ Consumer setGlobal,
+ Consumer validator) {
+ this.key = key;
+ this.defaultValue = defaultValue;
+ this.description = description;
+ this.setIndex = setIndex;
+ this.setGlobal = setGlobal;
+ this.validator = validator;
+ }
+
+ public void handle(Param param) {
+ if (null == setGlobal && null == setIndex) {
+ throw new TddlRuntimeException(ErrorCode.ERR_CONFIG, param.key.toUpperCase()
+ + " is not supported to set dynamically.");
+ }
+ if (null != validator) {
+ validator.accept(param);
+ }
+ if (null == param.tableId || 0 == param.tableId) {
+ if (null == setGlobal) {
+ throw new TddlRuntimeException(ErrorCode.ERR_CONFIG, param.key.toUpperCase()
+ + " is not supported to set global, please specify a particular columnar index.");
+ }
+ setGlobal.accept(param);
+ } else {
+ if (null == setIndex) {
+ throw new TddlRuntimeException(ErrorCode.ERR_CONFIG, param.key.toUpperCase()
+ + " is not supported to set for a particular index, "
+ + "please call columnar_config_set(key, value) to set a global config.");
+ }
+ setIndex.accept(param);
+ }
+ }
+
+ public String getDefault() {
+ return defaultValue;
+ }
+
+ public static class Param {
+ public String key;
+ public String value;
+ public String schemaName;
+ public String tableName;
+ public String indexName;
+ public Long tableId;
+ public Object serverConnection;
+
+ public Param shallowCopy() {
+ Param newParam = new Param();
+ newParam.key = this.key;
+ newParam.value = this.value;
+ newParam.schemaName = this.schemaName;
+ newParam.tableName = this.tableName;
+ newParam.indexName = this.indexName;
+ newParam.tableId = this.tableId;
+ return newParam;
+ }
+ }
+}
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/columnar/ColumnarUtils.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/columnar/ColumnarUtils.java
new file mode 100644
index 000000000..30acd2bf9
--- /dev/null
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/columnar/ColumnarUtils.java
@@ -0,0 +1,35 @@
+package com.alibaba.polardbx.common.columnar;
+
+import com.alibaba.polardbx.common.cdc.CdcDDLContext;
+import com.alibaba.polardbx.common.cdc.CdcDdlMarkVisibility;
+import com.alibaba.polardbx.common.cdc.CdcManagerHelper;
+import com.alibaba.polardbx.common.ddl.newengine.DdlType;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import static com.alibaba.polardbx.common.cdc.ICdcManager.CDC_MARK_RECORD_COMMIT_TSO;
+import static com.alibaba.polardbx.common.cdc.ICdcManager.DDL_ID;
+
+public class ColumnarUtils {
+
+ /**
+ * 添加cdc打标事件,默认DdlType.IGNORED标记,后续cdc检测到该类打标,可以优化处理,不会改变元数据
+ *
+ * @param sql 打标sql
+ * @return tso
+ */
+ public static Long AddCDCMarkEvent(String sql, String sqlKind) {
+ Map params = new HashMap<>();
+ params.put(CDC_MARK_RECORD_COMMIT_TSO, "true");
+ //打标信息metadb会记录DDL_ID,但是没有应用到事件中
+ params.put(DDL_ID, 1L);
+
+ CdcDDLContext context = new CdcDDLContext("polardbx", "polardbx_function", sqlKind,
+ sql, CdcDdlMarkVisibility.Protected, null, null,
+ DdlType.IGNORED, true, params, null, false, null, null, null, null, false);
+ CdcManagerHelper.getInstance().notifyDdlWithContext(context);
+
+ return context.getCommitTso();
+ }
+}
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/constants/ServerVariables.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/constants/ServerVariables.java
index 426149b6b..8ee3e6071 100644
--- a/polardbx-common/src/main/java/com/alibaba/polardbx/common/constants/ServerVariables.java
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/constants/ServerVariables.java
@@ -68,9 +68,18 @@ public class ServerVariables {
ConnectionProperties.ENABLE_TRX_IDLE_TIMEOUT_TASK,
ConnectionProperties.TRX_IDLE_TIMEOUT_TASK_INTERVAL);
+ public static final Set MODIFIABLE_SYNC_POINT_PARAM = ImmutableSet.of(
+ ConnectionProperties.ENABLE_SYNC_POINT,
+ ConnectionProperties.SYNC_POINT_TASK_INTERVAL);
+
public static final Set MODIFIABLE_TIMER_TASK_PARAM;
+ public static final String ENABLE_POLARX_SYNC_POINT = "enable_polarx_sync_point";
+
static {
+ variables.add(ENABLE_POLARX_SYNC_POINT);
+ variables.add("opt_flashback_area");
+ variables.add("innodb_txn_retention");
variables.add("activate_all_roles_on_login");
variables.add("admin_address");
variables.add("admin_port");
@@ -1048,7 +1057,9 @@ public class ServerVariables {
variables.add("warning_count");
variables.add("weak_consensus_mode");
variables.add("windowing_use_high_precision");
+ variables.add("polarx_sync_point_timeout");
variables.add("xa_detach_on_prepare");
+ variables.add("innodb_rds_faster_ddl");
readonlyVariables.add("audit_log_current_session");
readonlyVariables.add("audit_log_filter_id");
@@ -1231,6 +1242,8 @@ public class ServerVariables {
readonlyVariables.add("warning_count");
readonlyVariables.add("version_tokens_session_number");
+ writableVariables.add("opt_flashback_area");
+ writableVariables.add("innodb_txn_retention");
writableVariables.add("auto_increment_increment");
writableVariables.add("auto_increment_offset");
writableVariables.add("autocommit");
@@ -1642,6 +1655,9 @@ public class ServerVariables {
mysqlBothVariables.add("wait_timeout");
mysqlBothVariables.add("windowing_use_high_precision");
mysqlBothVariables.add("xa_detach_on_prepare");
+
+ mysqlGlobalVariables.add("opt_flashback_area");
+ mysqlGlobalVariables.add("innodb_txn_retention");
mysqlGlobalVariables.add("Ndb_conflict_last_conflict_epoch");
mysqlGlobalVariables.add("Ndb_replica_max_replicated_epoch");
mysqlGlobalVariables.add("Ndb_slave_max_replicated_epoch");
@@ -2649,6 +2665,9 @@ public class ServerVariables {
mysqlGlobalVariables.add("version_compile_os");
mysqlGlobalVariables.add("version_compile_zlib");
mysqlGlobalVariables.add("weak_consensus_mode");
+ mysqlGlobalVariables.add(ENABLE_POLARX_SYNC_POINT);
+ mysqlGlobalVariables.add("polarx_sync_point_timeout");
+
mysqlSessionVariables.add("debug_sync");
mysqlSessionVariables.add("error_count");
mysqlSessionVariables.add("external_user");
@@ -2681,6 +2700,11 @@ public class ServerVariables {
mysqlSessionVariables.add("transaction_allow_batching");
mysqlSessionVariables.add("use_secondary_engine");
mysqlSessionVariables.add("warning_count");
+
+ mysqlDynamicVariables.add("polarx_sync_point_timeout");
+ mysqlDynamicVariables.add(ENABLE_POLARX_SYNC_POINT);
+ mysqlDynamicVariables.add("opt_flashback_area");
+ mysqlDynamicVariables.add("innodb_txn_retention");
mysqlDynamicVariables.add("activate_all_roles_on_login");
mysqlDynamicVariables.add("admin_ssl_ca");
mysqlDynamicVariables.add("admin_ssl_capath");
@@ -3592,6 +3616,9 @@ public class ServerVariables {
globalBannedVariables.add("auto_increment_increment");
globalBannedVariables.add("super_write");
+ // 禁止全局设置:
+ globalBannedVariables.add("file_list");
+
ImmutableSet.Builder modifiableTimerTaskVarBuilder = new ImmutableSet.Builder<>();
for (String modifiableTimerTaskParam : MODIFIABLE_PURGE_TRANS_PARAM) {
@@ -3609,6 +3636,10 @@ public class ServerVariables {
for (String modifiableTimerTaskParam : MODIFIABLE_TRX_IDLE_TIMEOUT_PARAM) {
modifiableTimerTaskVarBuilder.add(modifiableTimerTaskParam);
}
+
+ for (String modifiableTimerTaskParam : MODIFIABLE_SYNC_POINT_PARAM) {
+ modifiableTimerTaskVarBuilder.add(modifiableTimerTaskParam);
+ }
MODIFIABLE_TIMER_TASK_PARAM = modifiableTimerTaskVarBuilder.build();
}
@@ -3668,7 +3699,7 @@ public static boolean isGlobalBanned(String variable) {
return globalBannedVariables.contains(variable.toLowerCase());
}
- public static boolean isGlobalBlackList(String variable) {
+ public static boolean isVariablesBlackList(String variable) {
return DynamicConfig.getInstance().getBlacklistConf().contains(variable.toLowerCase());
}
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/constants/SystemTables.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/constants/SystemTables.java
index b2a8cd6c6..1d7add075 100644
--- a/polardbx-common/src/main/java/com/alibaba/polardbx/common/constants/SystemTables.java
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/constants/SystemTables.java
@@ -75,6 +75,19 @@ public class SystemTables {
public static final String DRDS_SYSTABLE_VIEW = "__drds__systable__view__";
public static final String DRDS_SYSTEM_SCALEOUT_OUTLINE = "__drds__systable__scaleout__outline__";
public static final String DRDS_SYSTEM_SCALEOUT_BACKFILL_OBJECTS = "__drds__systable__scaleout__backfill_objects__";
+ public static final String DRDS_SYSTABLE_SCALEOUT_CHECKER_REPORTS = "__drds__systable__scaleout_checker_reports__";
+
+ //record all nodes for mpp
+ public static final String DRDS_NODEINFO_TABLE_NAME = "__drds__nodestatus__";
+
+
+ // Sync point table.
+ public static final String POLARDBX_SYNC_POINT_TB = "__polardbx_sync_point__";
+
+ //~----------- Depreciated Tables -----------
+
+ public static final String DRDS__SYSTEM__OUTLINE = "__drds__system__outline__";
+ public static final String DRDS_SYSTEM_FAILED_DDL = "__drds__system__failed__ddl__";
static {
Set systemTableSet = new HashSet<>();
@@ -106,6 +119,10 @@ public class SystemTables {
register(systemTableSet, DRDS_SYSTEM_SCALEOUT_BACKFILL_OBJECTS);
register(systemTableSet, DRDS_SYSTABLE_VIEW);
register(systemTableSet, DRDS_SYSTABLE_LOCKING_FUNCTION);
+ register(systemTableSet, POLARDBX_GLOBAL_TX_LOG_TABLE_PREFIX);
+ register(systemTableSet, POLARDBX_GLOBAL_TX_LOG_TABLE_ARCHIVE_TABLE);
+ register(systemTableSet, POLARDBX_SYNC_POINT_TB);
+
try {
// magic number 512
// Test after adding SystemTables
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/constants/TransactionAttribute.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/constants/TransactionAttribute.java
index 0bb0df180..574ebc425 100644
--- a/polardbx-common/src/main/java/com/alibaba/polardbx/common/constants/TransactionAttribute.java
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/constants/TransactionAttribute.java
@@ -21,6 +21,39 @@
import java.util.concurrent.atomic.AtomicLong;
public class TransactionAttribute {
+ public enum FormatId {
+ NORMAL(1),
+ RECOVER(2),
+ ARCHIVE(3),
+ IGNORE_BINLOG(4),
+ TSO_OPT_SR(5),
+ TSO_OPT(6),
+ ASYNC_COMMIT(7);
+
+ private final int id;
+
+ FormatId(int id) {
+ this.id = id;
+ }
+
+ public int id() {
+ return id;
+ }
+
+ public static FormatId fromId(int id) {
+ for (FormatId formatId : FormatId.values()) {
+ if (formatId.id == id) {
+ return formatId;
+ }
+ }
+ return null;
+ }
+
+ public static boolean isUserTransaction(int id) {
+ return id == NORMAL.id || id == ARCHIVE.id || id == IGNORE_BINLOG.id || id == TSO_OPT_SR.id
+ || id == TSO_OPT.id || id == ASYNC_COMMIT.id;
+ }
+ }
public static final IsolationLevel DEFAULT_ISOLATION_LEVEL = IsolationLevel.READ_COMMITTED;
@@ -32,6 +65,15 @@ public class TransactionAttribute {
public static final ITransactionPolicy DEFAULT_TRANSACTION_POLICY_MYSQL56 = ITransactionPolicy.ALLOW_READ_CROSS_DB;
+ /**
+ * Default Transaction Policy for PolarDB-X Instances CDC to ignore all binlog events
+ */
+ public static final ITransactionPolicy DEFAULT_IGNORE_BINLOG_TRANSACTION =
+ ITransactionPolicy.IGNORE_BINLOG_TRANSACTION;
+
+ /**
+ * DRDS 事务策略
+ */
public static final String DRDS_TRANSACTION_POLICY = "drds_transaction_policy";
public static final String SHARE_READ_VIEW = "share_read_view";
@@ -83,7 +125,7 @@ public class TransactionAttribute {
public static final int DEFAULT_COLUMNAR_TSO_PURGE_INTERVAL = 60000;
/**
- * Default Columnar TSO update Interval in milliseconds: 10 seconds
+ * Default Columnar TSO update Interval in milliseconds: 3 seconds
*/
public static final int DEFAULT_COLUMNAR_TSO_UPDATE_INTERVAL = 3000;
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/datatype/Decimal.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/datatype/Decimal.java
index 719cd3881..4046f0b1c 100644
--- a/polardbx-common/src/main/java/com/alibaba/polardbx/common/datatype/Decimal.java
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/datatype/Decimal.java
@@ -157,7 +157,7 @@ public Decimal multiply(Decimal d) {
public Decimal divide(Decimal d) {
DecimalStructure to = new DecimalStructure();
FastDecimalUtils
- .div(this.decimalStructure, d.decimalStructure, to, DecimalStructure.DIV_PRECISION_INCREMENT_DEFAULT, true);
+ .div(this.decimalStructure, d.decimalStructure, to, DecimalStructure.getDefaultDivPrecisionIncrement(), true);
return new Decimal(to);
}
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/datatype/DecimalTypeBase.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/datatype/DecimalTypeBase.java
index 1f1b136f7..05f8b1662 100644
--- a/polardbx-common/src/main/java/com/alibaba/polardbx/common/datatype/DecimalTypeBase.java
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/datatype/DecimalTypeBase.java
@@ -16,11 +16,15 @@
package com.alibaba.polardbx.common.datatype;
+import com.alibaba.polardbx.common.properties.DynamicConfig;
+
public class DecimalTypeBase {
public static final int DEFAULT_SCALE = 0;
// for divide precision.
- public final static int DEFAULT_DIV_PRECISION_INCREMENT = 4;
+ public static int getDefaultDivPrecisionIncrement() {
+ return DynamicConfig.getInstance().getCnDivPrecisionIncrement();
+ }
public final static String DIV_PRECISION_INCREMENT = "div_precision_increment";
// decimal memory
@@ -40,7 +44,6 @@ public class DecimalTypeBase {
public static final int E_DEC_DEC64 = 32;
public static final int E_DEC_DEC128 = 33;
- public static final int DIV_PRECISION_INCREMENT_DEFAULT = 4;
public static final byte[] BUFF_OFFSETS = {
0, 4, 8, 12, 16, 20, 24, 28, 32
};
@@ -98,6 +101,10 @@ public class DecimalTypeBase {
public static int[] POW_10 = {
1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000};
+ public static long[] POW_10_LONG = {
+ 1L, 10L, 100L, 1000L, 10000L, 100000L, 1000000L, 10000000L, 100000000L, 1000000000L, 10000000000L,
+ 100000000000L, 1000000000000L};
+
/**
* Get the occupied bytes from digits (1~10).
*/
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/ddl/Job.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/ddl/Job.java
index 9d4cfb90e..233d3357f 100644
--- a/polardbx-common/src/main/java/com/alibaba/polardbx/common/ddl/Job.java
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/ddl/Job.java
@@ -23,7 +23,8 @@ public enum JobSource {
}
public enum JobType {
- UNSUPPORTED, CREATE_TABLE, ALTER_TABLE, DROP_TABLE, RENAME_TABLE, TRUNCATE_TABLE, CREATE_INDEX, DROP_INDEX,
+ UNSUPPORTED, CREATE_TABLE, ALTER_TABLE, DROP_TABLE, RENAME_TABLE, TRUNCATE_TABLE, OPTIMIZE_TABLE, CREATE_INDEX,
+ DROP_INDEX,
CREATE_GLOBAL_INDEX, ALTER_GLOBAL_INDEX, DROP_GLOBAL_INDEX, RENAME_GLOBAL_INDEX, CHECK_GLOBAL_INDEX,
CHECK_COLUMNAR_INDEX, MOVE_TABLE, ALTER_TABLEGROUP, DRAIN_NODE, ALTER_TABLE_SET_TABLEGROUP,
ALTER_TABLEGROUP_ADD_TABLE,
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/ddl/newengine/DdlConstants.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/ddl/newengine/DdlConstants.java
index 59abe6b4c..f39331356 100644
--- a/polardbx-common/src/main/java/com/alibaba/polardbx/common/ddl/newengine/DdlConstants.java
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/ddl/newengine/DdlConstants.java
@@ -71,7 +71,7 @@ public class DdlConstants {
public static final int MIN_LOGICAL_DDL_PARALLELISM = 1;
public static final int MAX_LOGICAL_DDL_PARALLELISM = 16;
- public static final int DEFAULT_LOGICAL_DDL_PARALLELISM = 4;
+ public static final int DEFAULT_LOGICAL_DDL_PARALLELISM = 8;
public static final int MIN_ALLOWED_TABLE_SHARDS_PER_DB = 1;
public static final int MAX_ALLOWED_TABLE_SHARDS_PER_DB = 65535;
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/ddl/newengine/DdlType.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/ddl/newengine/DdlType.java
index a0a9f0e83..4e1a631a5 100644
--- a/polardbx-common/src/main/java/com/alibaba/polardbx/common/ddl/newengine/DdlType.java
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/ddl/newengine/DdlType.java
@@ -63,12 +63,12 @@ public enum DdlType {
ALTER_TABLEGROUP_ADD_TABLE,
ALTER_TABLE_RENAME_PARTITION,
- ALTER_TABLE_ADD_COLUMN,
- ALTER_TABLE_DROP_COLUMN,
- ALTER_TABLE_MODIFY_COLUMN,
- ALTER_TABLE_CHANGE_COLUMN,
+ MERGE_TABLEGROUP,
- MERGE_TABLEGROUP;
+ /**
+ * 忽略的ddl类型,实际不是ddl
+ */
+ IGNORED;
public enum AlterColumnSpecification {
AlterColumnName,
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/eventlogger/EventLogger.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/eventlogger/EventLogger.java
index 0941c2646..81573f13f 100644
--- a/polardbx-common/src/main/java/com/alibaba/polardbx/common/eventlogger/EventLogger.java
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/eventlogger/EventLogger.java
@@ -16,16 +16,21 @@
package com.alibaba.polardbx.common.eventlogger;
+import com.alibaba.polardbx.common.constants.TransactionAttribute;
import com.alibaba.polardbx.common.properties.DynamicConfig;
import com.alibaba.polardbx.common.utils.logger.Logger;
import com.alibaba.polardbx.common.utils.logger.LoggerFactory;
+import java.util.concurrent.atomic.AtomicLong;
+
public class EventLogger {
private final static Logger logger = LoggerFactory.getLogger("event", true);
private final static String LOG_FORMAT = "%s %s %s";
+ public static final AtomicLong LAST_LOG_CCI_SNAPSHOT = new AtomicLong(0);
+
public static void log(EventType type, String msg) {
if (EventType.isTrxEvent(type) && !DynamicConfig.getInstance().isEnableTrxEventLog()) {
return;
@@ -33,4 +38,16 @@ public static void log(EventType type, String msg) {
String logContent = String.format(LOG_FORMAT, type.getLevel().name(), type.name(), msg);
logger.info(logContent);
}
+
+ public static void logCciSnapshot(long num) {
+ long lastLogTime = LAST_LOG_CCI_SNAPSHOT.get();
+ if (shouldWriteEventLog(lastLogTime) && LAST_LOG_CCI_SNAPSHOT.compareAndSet(lastLogTime, System.nanoTime())) {
+ EventLogger.log(EventType.CCI_SNAPSHOT, "Found " + num + " cci snapshots");
+ }
+ }
+
+ public static boolean shouldWriteEventLog(long lastLogTime) {
+ // Write event log every 7 * 24 hours.
+ return lastLogTime == 0 || ((System.nanoTime() - lastLogTime) / 1000000000) > 604800;
+ }
}
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/eventlogger/EventType.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/eventlogger/EventType.java
index 61231da08..ded7f7c72 100644
--- a/polardbx-common/src/main/java/com/alibaba/polardbx/common/eventlogger/EventType.java
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/eventlogger/EventType.java
@@ -24,6 +24,8 @@ public enum EventType {
*/
REBALANCE_INFO(EventLevel.INFO),
+ DDL_MPP_INFO(EventLevel.INFO),
+
/**
* 用于统计一些DDL发生的次数
*/
@@ -97,6 +99,15 @@ public enum EventType {
INIT_OSS(EventLevel.INFO),
CLOSE_OSS(EventLevel.INFO),
+ /**
+ * Usage statistics for TTL 2.0
+ */
+ CREATE_TTL_DEFINITION(EventLevel.INFO),
+ CREATE_TTL_DEFINITION_WITH_ARCHIVE_TABLE(EventLevel.INFO),
+ CREATE_CCI_ARCHIVE_TABLE(EventLevel.INFO),
+ DROP_CCI_ARCHIVE_TABLE(EventLevel.INFO),
+ CLEANUP_EXPIRED_DATA(EventLevel.INFO),
+
OPTIMIZER_ALERT(EventLevel.INFO),
AUTO_SP(EventLevel.INFO),
@@ -107,7 +118,9 @@ public enum EventType {
TRX_RECOVER(EventLevel.INFO),
TRX_INFO(EventLevel.INFO),
TRX_ERR(EventLevel.INFO),
-
+ COLUMNAR_ERR(EventLevel.INFO),
+ CCI_SNAPSHOT(EventLevel.INFO),
+ METRICS(EventLevel.INFO),
CDC_WARN(EventLevel.WARN);
private final EventLevel level;
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/exception/code/ErrorCode.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/exception/code/ErrorCode.java
index d3512268e..bb33f12b6 100644
--- a/polardbx-common/src/main/java/com/alibaba/polardbx/common/exception/code/ErrorCode.java
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/exception/code/ErrorCode.java
@@ -890,6 +890,8 @@ public enum ErrorCode {
ERR_CREATE_SELECT_WITH_OSS(ErrorType.Executor, 4668),
+ ERR_CREATE_TABLE_WITH_TTL(ErrorType.Executor, 4710),
+
// ============= server 从4700下标开始================
ERR_SERVER(ErrorType.Server, 4700),
@@ -955,6 +957,8 @@ public enum ErrorCode {
// 事务超时
ERR_TRANS_IDLE_TIMEOUT(ErrorType.Transaction, 5016),
+
+ ERR_FLASHBACK_AREA(ErrorType.Transaction, 5017),
// ================权限相关异常从5101开始==================
/**
* 暂时不支持的权限点
@@ -1256,6 +1260,8 @@ public enum ErrorCode {
ERR_REPLICA_NOT_SUPPORT(ErrorType.CDC, 9205),
ERR_INSTANCE_READ_ONLY_OPTION_SET_FAILED(ErrorType.CDC, 9206),
+ ERR_CDC_INVALID_PARAMS(ErrorType.CDC, 9207),
+ ERR_SQL_LOG_BIN_NOT_SUPPORT_AUTO_COMMIT(ErrorType.CDC, 9208),
ERR_PARTITION_MANAGEMENT(ErrorType.Executor, 9300),
@@ -1306,6 +1312,13 @@ public enum ErrorCode {
ERR_REDUNDANCY_SUBPARTITION_DEFINITION(ErrorType.Executor, 9339),
ERR_AUTO_CREATE_TABLEGROUP(ErrorType.Executor, 9340),
+ // ============= TTL Exceptions, Error Code from 9380 ~ 9399 ================
+ ERR_TTL(ErrorType.Executor, 9380),
+ ERR_TTL_INTERRUPTED(ErrorType.Executor, 9381),
+ ERR_TTL_TABLE_NOT_FOUND(ErrorType.Executor, 9382),
+ ERR_TTL_COLUMN_NOT_FOUND(ErrorType.Executor, 9383),
+ ERR_TTL_PARAMS(ErrorType.Executor, 9384),
+
// ============= 私有协议 从10000下标开始================
ERR_X_PROTOCOL_BAD_PACKET(ErrorType.Xprotocol, 10000),
@@ -1341,7 +1354,11 @@ public enum ErrorCode {
ERR_LOAD_DEL_FILE(ErrorType.ColumnarAccess, 12003),
ERR_LOAD_ORC_FILE(ErrorType.ColumnarAccess, 12004),
ERR_COLUMNAR_SNAPSHOT(ErrorType.GMS, 12005),
- ERR_COLUMNAR_SCHEMA(ErrorType.GMS, 12006);
+ ERR_COLUMNAR_SCHEMA(ErrorType.GMS, 12006),
+
+ ERR_COLUMNAR_DROP_PARTITION(ErrorType.Executor, 12011),
+ ERR_COLUMNAR_MODIFY_PARTITION_DROP_VALUE(ErrorType.Executor, 12012),
+ ERR_COLUMNAR_TRUNCATE_PARTITION(ErrorType.Executor, 12013);
private static final String errorMessagePre = "ERR-CODE: [PXC-";
private final int code;
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/jdbc/IConnection.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/jdbc/IConnection.java
index d17a25162..0eeb8c7da 100644
--- a/polardbx-common/src/main/java/com/alibaba/polardbx/common/jdbc/IConnection.java
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/jdbc/IConnection.java
@@ -19,6 +19,7 @@
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
+import java.sql.Statement;
import java.util.Map;
import java.util.concurrent.Executor;
@@ -113,4 +114,22 @@ default int getShareReadViewSeq() {
void discard(Throwable t);
void kill() throws SQLException;
+
+ default IConnection enableFlashbackArea(boolean enable) throws SQLException {
+ if (enable) {
+ this.executeLater("SET query_via_flashback_area = 1");
+ }
+ return this;
+ }
+
+ default void disableFlashbackArea() throws SQLException {
+ try (Statement stmt = createStatement()) {
+ stmt.execute("SET query_via_flashback_area = 0");
+ } catch (Throwable t) {
+ // For safety, discard connection.
+ discard(t);
+ throw t;
+ }
+ }
+
}
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/jdbc/ITransactionPolicy.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/jdbc/ITransactionPolicy.java
index efa20b327..c4d515a51 100644
--- a/polardbx-common/src/main/java/com/alibaba/polardbx/common/jdbc/ITransactionPolicy.java
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/jdbc/ITransactionPolicy.java
@@ -18,7 +18,6 @@
import com.alibaba.polardbx.common.exception.TddlRuntimeException;
import com.alibaba.polardbx.common.exception.code.ErrorCode;
-import com.alibaba.polardbx.common.properties.DynamicConfig;
import com.alibaba.polardbx.common.utils.TStringUtil;
import java.util.EnumSet;
@@ -44,7 +43,7 @@ enum TransactionClass {
AUTO_COMMIT_SINGLE_SHARD,
/**
- * XA transaction with Commit TimeStamp.
+ * XA transaction with TSO as commit_seq.
*/
XA_TSO,
@@ -70,7 +69,8 @@ enum TransactionClass {
AUTO_COMMIT_TSO,
- ARCHIVE;
+ ARCHIVE,
+ IGNORE_BINLOG_TRANSACTION;
public boolean isA(EnumSet set) {
return set.contains(this);
@@ -83,7 +83,8 @@ public boolean isA(EnumSet set) {
TransactionClass.TSO_READONLY,
TransactionClass.AUTO_COMMIT_SINGLE_SHARD,
TSO_2PC_OPT,
- TransactionClass.ARCHIVE);
+ TransactionClass.ARCHIVE,
+ TransactionClass.IGNORE_BINLOG_TRANSACTION);
public static final EnumSet EXPLICIT_TRANSACTION = EnumSet
.of(TransactionClass.XA,
@@ -92,7 +93,8 @@ public boolean isA(EnumSet set) {
TransactionClass.ALLOW_READ_CROSS_DB,
TransactionClass.COBAR_STYLE,
TSO_2PC_OPT,
- TransactionClass.ARCHIVE);
+ TransactionClass.ARCHIVE,
+ TransactionClass.IGNORE_BINLOG_TRANSACTION);
public static final EnumSet TSO_TRANSACTION = EnumSet
.of(TransactionClass.TSO,
@@ -116,7 +118,8 @@ public boolean isA(EnumSet set) {
TransactionClass.XA_TSO,
TransactionClass.TSO,
TSO_2PC_OPT,
- TransactionClass.ARCHIVE);
+ TransactionClass.ARCHIVE,
+ TransactionClass.IGNORE_BINLOG_TRANSACTION);
public static final EnumSet SUPPORT_PARALLEL_GET_CONNECTION_TRANSACTION = EnumSet
.of(TransactionClass.XA,
@@ -126,7 +129,8 @@ public boolean isA(EnumSet set) {
TransactionClass.AUTO_COMMIT_SINGLE_SHARD,
TransactionClass.AUTO_COMMIT_TSO,
TransactionClass.TSO_READONLY,
- TransactionClass.ARCHIVE);
+ TransactionClass.ARCHIVE,
+ TransactionClass.IGNORE_BINLOG_TRANSACTION);
public static final EnumSet ALLOW_GROUP_PARALLELISM_WITHOUT_SHARE_READVIEW_TRANSACTION =
EnumSet.of(TransactionClass.AUTO_COMMIT,
@@ -138,19 +142,24 @@ public boolean isA(EnumSet set) {
NoTransaction NO_TRANSACTION = new NoTransaction();
DefaultPolicy XA = new DefaultPolicy(TransactionClass.XA);
Tso TSO = new Tso();
- DefaultPolicy ARCHIVE = new DefaultPolicy(TransactionClass.ARCHIVE);
-
- TransactionClass getTransactionType(boolean isAutoCommit, boolean isReadOnly);
-
- default TransactionClass getTransactionType(boolean isAutoCommit, boolean isReadOnly, boolean isSingleShard) {
- return getTransactionType(isAutoCommit, isReadOnly);
- }
+ DefaultPolicy BEST_EFFORT = new DefaultPolicy(TransactionClass.BEST_EFFORT);
+ Archive ARCHIVE = new Archive();
+ DefaultPolicy IGNORE_BINLOG_TRANSACTION = new DefaultPolicy(TransactionClass.IGNORE_BINLOG_TRANSACTION);
+
+ /**
+ * If isAutoCommit is true but isForbidAutoCommitTrx is true,
+ * it means this session is in autocommit mode,
+ * but we will not create an autocommit transaction object.
+ */
+ TransactionClass getTransactionType(boolean isAutoCommit, boolean isReadOnly, boolean isSingleShard,
+ boolean isForbidAutoCommitTrx);
class Free implements ITransactionPolicy {
@Override
- public TransactionClass getTransactionType(boolean isAutoCommit, boolean isReadOnly) {
- if (isAutoCommit) {
+ public TransactionClass getTransactionType(boolean isAutoCommit, boolean isReadOnly, boolean isSingleShard,
+ boolean isForbidAutoCommitTrx) {
+ if (isAutoCommit && !isForbidAutoCommitTrx) {
return TransactionClass.AUTO_COMMIT;
}
@@ -166,8 +175,9 @@ public String toString() {
class AllowRead implements ITransactionPolicy {
@Override
- public TransactionClass getTransactionType(boolean isAutoCommit, boolean isReadOnly) {
- if (isAutoCommit) {
+ public TransactionClass getTransactionType(boolean isAutoCommit, boolean isReadOnly, boolean isSingleShard,
+ boolean isForbidAutoCommitTrx) {
+ if (isAutoCommit && !isForbidAutoCommitTrx) {
return TransactionClass.AUTO_COMMIT;
}
@@ -181,19 +191,14 @@ public String toString() {
}
class Tso implements ITransactionPolicy {
-
@Override
- public TransactionClass getTransactionType(boolean isAutoCommit, boolean isReadOnly) {
- return getTransactionType(isAutoCommit, isReadOnly, false);
- }
-
- @Override
- public TransactionClass getTransactionType(boolean isAutoCommit, boolean isReadOnly, boolean isSingleShard) {
+ public TransactionClass getTransactionType(boolean isAutoCommit, boolean isReadOnly, boolean isSingleShard,
+ boolean isForbidAutoCommitTrx) {
if (isSingleShard && isReadOnly) {
return TransactionClass.AUTO_COMMIT_SINGLE_SHARD;
} else if (isReadOnly) {
return TransactionClass.TSO_READONLY;
- } else if (isAutoCommit && !DynamicConfig.getInstance().isForbidAutoCommitTrx()) {
+ } else if (isAutoCommit && !isForbidAutoCommitTrx) {
return TransactionClass.AUTO_COMMIT;
} else {
return TransactionClass.TSO;
@@ -209,7 +214,11 @@ public String toString() {
class NoTransaction implements ITransactionPolicy {
@Override
- public TransactionClass getTransactionType(boolean isAutoCommit, boolean isReadOnly) {
+ public TransactionClass getTransactionType(boolean isAutoCommit, boolean isReadOnly, boolean isSingleShard,
+ boolean isForbidAutoCommitTrx) {
+ if (isForbidAutoCommitTrx) {
+ return TransactionClass.TSO;
+ }
return TransactionClass.AUTO_COMMIT;
}
@@ -229,14 +238,10 @@ public DefaultPolicy(TransactionClass type) {
this.auto = false;
}
- public DefaultPolicy(TransactionClass type, boolean auto) {
- this.type = type;
- this.auto = auto;
- }
-
@Override
- public TransactionClass getTransactionType(boolean isAutoCommit, boolean isReadOnly) {
- if (!auto && isAutoCommit && !DynamicConfig.getInstance().isForbidAutoCommitTrx()) {
+ public TransactionClass getTransactionType(boolean isAutoCommit, boolean isReadOnly, boolean isSingleShard,
+ boolean isForbidAutoCommitTrx) {
+ if (!auto && isAutoCommit && !isForbidAutoCommitTrx) {
return TransactionClass.AUTO_COMMIT;
}
return type;
@@ -248,6 +253,20 @@ public String toString() {
}
}
+ class Archive implements ITransactionPolicy {
+
+ @Override
+ public TransactionClass getTransactionType(boolean isAutoCommit, boolean isReadOnly, boolean isSingleShard,
+ boolean isForbidAutoCommitTrx) {
+ return TransactionClass.ARCHIVE;
+ }
+
+ @Override
+ public String toString() {
+ return "ARCHIVE";
+ }
+ }
+
static ITransactionPolicy of(String name) {
if (TStringUtil.isEmpty(name)) {
return null;
@@ -269,6 +288,8 @@ static ITransactionPolicy of(String name) {
return ITransactionPolicy.NO_TRANSACTION;
case "ARCHIVE":
return ITransactionPolicy.ARCHIVE;
+ case "IGNORE_BINLOG_TRANSACTION":
+ return ITransactionPolicy.IGNORE_BINLOG_TRANSACTION;
default:
throw new TddlRuntimeException(ErrorCode.ERR_CONFIG, "Unknown transaction policy: " + name);
}
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/jdbc/ParameterContext.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/jdbc/ParameterContext.java
index 50c70d4f8..a676bae12 100644
--- a/polardbx-common/src/main/java/com/alibaba/polardbx/common/jdbc/ParameterContext.java
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/jdbc/ParameterContext.java
@@ -16,6 +16,7 @@
package com.alibaba.polardbx.common.jdbc;
+import com.alibaba.polardbx.common.properties.DynamicConfig;
import com.alibaba.polardbx.common.utils.GeneralUtil;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -84,7 +85,12 @@ public String toString() {
} else if (args[i] instanceof RawString) {
buffer.append(((RawString) args[i]).display());
} else {
- buffer.append(args[i]);
+ if (DynamicConfig.getInstance().isEnableChangeParamTypeByMeta()
+ && this.parameterMethod == ParameterMethod.setString) {
+ buffer.append("'").append(args[i]).append("'");
+ } else {
+ buffer.append(args[i]);
+ }
}
if (i != args.length - 1) {
buffer.append(", ");
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/jdbc/ShareReadViewPolicy.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/jdbc/ShareReadViewPolicy.java
index 77a03c9f2..add1c5919 100644
--- a/polardbx-common/src/main/java/com/alibaba/polardbx/common/jdbc/ShareReadViewPolicy.java
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/jdbc/ShareReadViewPolicy.java
@@ -18,6 +18,7 @@
import com.alibaba.polardbx.common.exception.TddlRuntimeException;
import com.alibaba.polardbx.common.exception.code.ErrorCode;
+import com.alibaba.polardbx.common.properties.DynamicConfig;
import java.sql.Connection;
@@ -28,13 +29,16 @@ public enum ShareReadViewPolicy {
DEFAULT;
public static boolean supportTxIsolation(int isolationLevel) {
- return isolationLevel == Connection.TRANSACTION_REPEATABLE_READ;
+ return isolationLevel == Connection.TRANSACTION_REPEATABLE_READ ||
+ (DynamicConfig.getInstance().isEnableShareReadviewInRc()
+ && isolationLevel == Connection.TRANSACTION_READ_COMMITTED);
}
public static void checkTxIsolation(int isolationLevel) {
- if (isolationLevel != Connection.TRANSACTION_REPEATABLE_READ) {
+ if (!supportTxIsolation(isolationLevel)) {
throw new TddlRuntimeException(ErrorCode.ERR_TRANS,
- "Share read view is only supported in repeatable-read.");
+ "Share read view is only supported in repeatable-read. "
+ + "Or in read-committed when ENABLE_SHARE_READVIEW_IN_RC is true.");
}
}
}
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/mock/MockStatus.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/mock/MockStatus.java
new file mode 100644
index 000000000..0067944c6
--- /dev/null
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/mock/MockStatus.java
@@ -0,0 +1,13 @@
+package com.alibaba.polardbx.common.mock;
+
+public class MockStatus {
+ private static volatile boolean mock = false;
+
+ public static boolean isMock() {
+ return mock;
+ }
+
+ public static void setMock(boolean mock) {
+ MockStatus.mock = mock;
+ }
+}
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/oss/IDeltaReadOption.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/oss/IDeltaReadOption.java
new file mode 100644
index 000000000..52d44d23b
--- /dev/null
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/oss/IDeltaReadOption.java
@@ -0,0 +1,4 @@
+package com.alibaba.polardbx.common.oss;
+
+public interface IDeltaReadOption {
+}
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/oss/filesystem/Constants.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/oss/filesystem/Constants.java
index df9921746..126149800 100644
--- a/polardbx-common/src/main/java/com/alibaba/polardbx/common/oss/filesystem/Constants.java
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/oss/filesystem/Constants.java
@@ -45,12 +45,12 @@ private Constants() {
// Number of simultaneous connections to oss
public static final String MAXIMUM_CONNECTIONS_KEY =
"fs.oss.connection.maximum";
- public static final int MAXIMUM_CONNECTIONS_DEFAULT = 32;
+ public static final int MAXIMUM_CONNECTIONS_DEFAULT = 2048;
// Connect to oss over ssl
public static final String SECURE_CONNECTIONS_KEY =
"fs.oss.connection.secure.enabled";
- public static final boolean SECURE_CONNECTIONS_DEFAULT = true;
+ public static final boolean SECURE_CONNECTIONS_DEFAULT = false;
// Use a custom endpoint
public static final String ENDPOINT_KEY = "fs.oss.endpoint";
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/oss/filesystem/FSOSSInputStream.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/oss/filesystem/FSOSSInputStream.java
new file mode 100644
index 000000000..346e94f2f
--- /dev/null
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/oss/filesystem/FSOSSInputStream.java
@@ -0,0 +1,88 @@
+package com.alibaba.polardbx.common.oss.filesystem;
+
+import org.apache.hadoop.fs.FSInputStream;
+import org.jetbrains.annotations.NotNull;
+
+import java.io.BufferedInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+public class FSOSSInputStream extends FSInputStream {
+ private final OSSFileSystemStore ossFileSystemStore;
+ private final String ossKeyPath;
+
+ private final int bufferSize;
+ private InputStream inputStream;
+
+ private final long contentLength;
+ private long pos;
+
+ public FSOSSInputStream(OSSFileSystemStore ossFileSystemStore, String ossKeyPath, int bufferSize) {
+ this.ossFileSystemStore = ossFileSystemStore;
+ this.ossKeyPath = ossKeyPath;
+ this.bufferSize = bufferSize;
+ this.inputStream = new BufferedInputStream(ossFileSystemStore.retrieve(ossKeyPath, 0, -1), bufferSize);
+ this.pos = 0;
+ this.contentLength = ossFileSystemStore.getOssFileLength(ossKeyPath);
+ }
+
+ @Override
+ public void seek(long pos) throws IOException {
+ if (pos < 0) {
+ return;
+ }
+ close();
+ InputStream inputStream1 =
+ new BufferedInputStream(ossFileSystemStore.retrieve(ossKeyPath, pos, -1), bufferSize);
+ this.pos = pos;
+ this.inputStream = inputStream1;
+ }
+
+ @Override
+ public long getPos() {
+ return pos;
+ }
+
+ @Override
+ public boolean seekToNewSource(long targetPos) throws IOException {
+ throw new IOException("seekToNewSource is not supported!");
+ }
+
+ @Override
+ public int read() throws IOException {
+ int data = inputStream.read();
+ pos++;
+ return data;
+ }
+
+ @Override
+ public int read(byte @NotNull [] b) throws IOException {
+ int num = inputStream.read(b);
+ pos += num;
+ return num;
+ }
+
+ @Override
+ public int read(byte @NotNull [] b, int off, int len) throws IOException {
+ int num = inputStream.read(b, off, len);
+ pos += num;
+ return num;
+ }
+
+ @Override
+ public long skip(long n) throws IOException {
+ long num = inputStream.skip(n);
+ pos += num;
+ return num;
+ }
+
+ @Override
+ public int available() throws IOException {
+ return (int) (contentLength - pos);
+ }
+
+ @Override
+ public void close() throws IOException {
+ inputStream.close();
+ }
+}
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/oss/filesystem/GuavaFileSystemRateLimiter.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/oss/filesystem/GuavaFileSystemRateLimiter.java
index e6cf41597..b8847a947 100644
--- a/polardbx-common/src/main/java/com/alibaba/polardbx/common/oss/filesystem/GuavaFileSystemRateLimiter.java
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/oss/filesystem/GuavaFileSystemRateLimiter.java
@@ -16,7 +16,7 @@
package com.alibaba.polardbx.common.oss.filesystem;
-import org.apache.curator.shaded.com.google.common.util.concurrent.RateLimiter;
+import com.google.common.util.concurrent.RateLimiter;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
@@ -77,7 +77,7 @@ public void acquireRead(int permit) throws IOException {
"read timeout for rate limiter: %s s with max rate: %s bytes/s",
ACQUIRE_TIMEOUT_IN_SECOND,
this.readRate)
- );
+ );
}
}
}
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/oss/filesystem/OSSInputStream.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/oss/filesystem/OSSInputStream.java
index 5b81ed1d5..8c93a8f3a 100644
--- a/polardbx-common/src/main/java/com/alibaba/polardbx/common/oss/filesystem/OSSInputStream.java
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/oss/filesystem/OSSInputStream.java
@@ -49,6 +49,7 @@ public class OSSInputStream extends FSInputStream {
private long contentLength;
private long position;
private long partRemaining;
+ private long latestPartSize;
private byte[] buffer;
private int maxReadAheadPartNumber;
private long expectNextPos;
@@ -109,7 +110,7 @@ private synchronized void reopen(long pos, long downloadPartSize) throws IOExcep
}
boolean isRandomIO = true;
- if (pos == this.expectNextPos) {
+ if (pos == this.expectNextPos && partSize == latestPartSize) {
isRandomIO = false;
} else {
//new seek, remove cache buffers if its byteStart is not equal to pos
@@ -182,6 +183,7 @@ private synchronized void reopen(long pos, long downloadPartSize) throws IOExcep
}
position = pos;
partRemaining = partSize;
+ latestPartSize = partSize;
}
/**
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/oss/filesystem/cache/FileMergeCacheManager.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/oss/filesystem/cache/FileMergeCacheManager.java
index 20893e8c3..032136d62 100644
--- a/polardbx-common/src/main/java/com/alibaba/polardbx/common/oss/filesystem/cache/FileMergeCacheManager.java
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/oss/filesystem/cache/FileMergeCacheManager.java
@@ -32,6 +32,7 @@
import com.alibaba.polardbx.common.Engine;
import com.alibaba.polardbx.common.properties.FileConfig;
+import com.alibaba.polardbx.common.utils.ConcurrentHashSet;
import com.alibaba.polardbx.common.utils.GeneralUtil;
import com.alibaba.polardbx.common.utils.logger.Logger;
import com.alibaba.polardbx.common.utils.logger.LoggerFactory;
@@ -50,7 +51,6 @@
import io.airlift.slice.SizeOf;
import io.airlift.slice.Slice;
import org.apache.hadoop.fs.Path;
-import org.eclipse.jetty.util.ConcurrentHashSet;
import java.io.Closeable;
import java.io.File;
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/privilege/MySQLPrivilegesName.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/privilege/MySQLPrivilegesName.java
new file mode 100644
index 000000000..314f0b274
--- /dev/null
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/privilege/MySQLPrivilegesName.java
@@ -0,0 +1,67 @@
+package com.alibaba.polardbx.common.privilege;
+
+public enum MySQLPrivilegesName {
+ ALTER("Alter", "Tables", "To alter the table"),
+ ALTER_ROUTINE("Alter routine", "Functions,Procedures", "To alter or drop stored functions/procedures"),
+ CREATE("Create", "Databases,Tables,Indexes", "To create new databases and tables"),
+ CREATE_ROUTINE("Create routine", "Databases", "To use CREATE FUNCTION/PROCEDURE"),
+ CREATE_TEMPORARY_TABLES("Create temporary tables", "Databases", "To use CREATE TEMPORARY TABLE"),
+ CREATE_VIEW("Create view", "Tables", "To create new views"),
+ CREATE_USER("Create user", "Server Admin", "To create new users"),
+ DELETE("Delete", "Tables", "To delete existing rows"),
+ DROP("Drop", "Databases,Tables", "To drop databases, tables, and views"),
+ EVENT("Event", "Server Admin", "To create, alter, drop and execute events"),
+ EXECUTE("Execute", "Functions,Procedures", "To execute stored routines"),
+ FILE("File", "File access on server", "To read and write files on the server"),
+ GRANT_OPTION("Grant option", "Databases,Tables,Functions,Procedures",
+ "To give to other users those privileges you possess"),
+ INDEX("Index", "Tables", "To create or drop indexes"),
+ INSERT("Insert", "Tables", "To insert data into tables"),
+ LOCK_TABLES("Lock tables", "Databases", "To use LOCK TABLES (together with SELECT privilege)"),
+ PROCESS("Process", "Server Admin", "To view the plain text of currently executing queries"),
+ PROXY("Proxy", "Server Admin", "To make proxy user possible"),
+ REFERENCES("References", "Databases,Tables", "To have references on tables"),
+ RELOAD("Reload", "Server Admin", "To reload or refresh tables, logs and privileges"),
+ REPLICATION_CLIENT("Replication client", "Server Admin", "To ask where the slave or master servers are"),
+ REPLICATION_SLAVE("Replication slave", "Server Admin", "To read binary log events from the master"),
+ SELECT("Select", "Tables", "To retrieve rows from table"),
+ SHOW_DATABASES("Show databases", "Server Admin", "To see all databases with SHOW DATABASES"),
+ SHOW_VIEW("Show view", "Tables", "To see views with SHOW CREATE VIEW"),
+ SHUTDOWN("Shutdown", "Server Admin", "To shut down the server"),
+ SUPER("Super", "Server Admin", "To use KILL thread, SET GLOBAL, CHANGE MASTER, etc."),
+ TRIGGER("Trigger", "Tables", "To use triggers"),
+ CREATE_TABLESPACE("Create tablespace", "Server Admin", "To create/alter/drop tablespaces"),
+ UPDATE("Update", "Tables", "To update existing rows"),
+ USAGE("Usage", "Server Admin", "No privileges - allow connect only");
+
+ private final String privilege;
+ private final String context;
+ private final String comment;
+
+ MySQLPrivilegesName(String privilege, String context, String comment) {
+ this.privilege = privilege;
+ this.context = context;
+ this.comment = comment;
+ }
+
+ public String getPrivilege() {
+ return privilege;
+ }
+
+ public String getContext() {
+ return context;
+ }
+
+ public String getComment() {
+ return comment;
+ }
+
+ @Override
+ public String toString() {
+ return "DatabasePrivilege{" +
+ "privilege='" + privilege + '\'' +
+ ", context='" + context + '\'' +
+ ", comment='" + comment + '\'' +
+ '}';
+ }
+}
\ No newline at end of file
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/properties/ColumnarConfig.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/properties/ColumnarConfig.java
new file mode 100644
index 000000000..8aac908ae
--- /dev/null
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/properties/ColumnarConfig.java
@@ -0,0 +1,39 @@
+package com.alibaba.polardbx.common.properties;
+
+import com.alibaba.polardbx.common.columnar.ColumnarOption;
+import com.alibaba.polardbx.common.exception.TddlRuntimeException;
+import com.alibaba.polardbx.common.exception.code.ErrorCode;
+
+import java.util.Map;
+
+/**
+ * Declare options in ColumnarOptions, and define them in ColumnarConfigHandler.
+ * @author yaozhili
+ */
+public final class ColumnarConfig {
+ public static String DEFAULT = "DEFAULT";
+ public static String SNAPSHOT = "SNAPSHOT";
+ private static Map CONFIG = null;
+
+ synchronized public static void init(Map config) {
+ CONFIG = config;
+ }
+
+ public static ColumnarOption get(String k) {
+ return null == CONFIG ? null : CONFIG.get(k);
+ }
+
+ public static String getValue(String key, Map indexConfig, Map globalConfig) {
+ String val = null;
+ if (null != indexConfig) {
+ val = indexConfig.get(key);
+ }
+ if (null == val && null != globalConfig) {
+ val = globalConfig.get(key);
+ }
+ if (null == val && CONFIG.containsKey(key)) {
+ val = CONFIG.get(key).getDefault();
+ }
+ return val;
+ }
+}
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/properties/ConnectionParams.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/properties/ConnectionParams.java
index 64ad01c15..5561216c8 100644
--- a/polardbx-common/src/main/java/com/alibaba/polardbx/common/properties/ConnectionParams.java
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/properties/ConnectionParams.java
@@ -296,6 +296,14 @@ public class ConnectionParams {
Attribute.DEFAULT_PURE_ASYNC_DDL_MODE,
false);
+ /**
+ * Label if return job_id on async_ddl_mode when submit ddl
+ */
+ public static final BooleanConfigParam RETURN_JOB_ID_ON_ASYNC_DDL_MODE =
+ new BooleanConfigParam(ConnectionProperties.RETURN_JOB_ID_ON_ASYNC_DDL_MODE,
+ false,
+ false);
+
/**
* Check if the "INSTANT ADD COLUMN" feature is supported.
*/
@@ -421,11 +429,49 @@ public class ConnectionParams {
false,
false);
+ /**
+ * 在事务时,DML忽略串行执行策略规则,详情请见ExecUtils.getQueryConcurrencyPolicy
+ */
+ public final static BooleanConfigParam ENABLE_DML_GROUP_CONCURRENT_IN_TRANSACTION = new BooleanConfigParam(
+ ConnectionProperties.ENABLE_DML_GROUP_CONCURRENT_IN_TRANSACTION,
+ false,
+ true);
+
+ /**
+ * 指定 DML 执行策略, PUSHDOWN, DETERMINISTIC_PUSHDOWN, LOGICAL
+ */
public final static StringConfigParam DML_EXECUTION_STRATEGY = new StringConfigParam(
ConnectionProperties.DML_EXECUTION_STRATEGY,
null,
false);
+ /**
+ * 是否下推 WHERE 条件中包含目标表子查询的 DELETE/UPDATE 语句
+ */
+ public final static BooleanConfigParam DML_PUSH_MODIFY_WITH_SUBQUERY_CONDITION_OF_TARGET = new BooleanConfigParam(
+ ConnectionProperties.DML_PUSH_MODIFY_WITH_SUBQUERY_CONDITION_OF_TARGET,
+ true,
+ false);
+
+ /**
+ * 是否禁止 SET 子句中包含子查询的 UPDATE 语句
+ */
+ public final static BooleanConfigParam DML_FORBID_UPDATE_WITH_SUBQUERY_IN_SET = new BooleanConfigParam(
+ ConnectionProperties.DML_FORBID_UPDATE_WITH_SUBQUERY_IN_SET,
+ true,
+ false);
+
+ /**
+ * 是否禁止 SET 子句中包含子查询的 UPDATE 语句 下推执行,
+ */
+ public final static BooleanConfigParam DML_FORBID_PUSH_DOWN_UPDATE_WITH_SUBQUERY_IN_SET = new BooleanConfigParam(
+ ConnectionProperties.DML_FORBID_PUSH_DOWN_UPDATE_WITH_SUBQUERY_IN_SET,
+ true,
+ false);
+
+ /**
+ * 是否下推 INSERT IGNORE / REPLACE / UPSERT
+ */
public final static BooleanConfigParam DML_PUSH_DUPLICATE_CHECK = new BooleanConfigParam(
ConnectionProperties.DML_PUSH_DUPLICATE_CHECK,
true,
@@ -462,6 +508,31 @@ public class ConnectionParams {
true,
false);
+ /**
+ * 是否使用 returning 优化包含 order by limit 的 update / delete
+ */
+ public final static BooleanConfigParam OPTIMIZE_MODIFY_TOP_N_BY_RETURNING = new BooleanConfigParam(
+ ConnectionProperties.OPTIMIZE_MODIFY_TOP_N_BY_RETURNING,
+ false,
+ false);
+
+ /**
+ * 是否使用 returning 优化需要逻辑执行的 DELETE
+ */
+ public final static BooleanConfigParam OPTIMIZE_DELETE_BY_RETURNING = new BooleanConfigParam(
+ ConnectionProperties.OPTIMIZE_DELETE_BY_RETURNING,
+ false,
+ false);
+
+ /**
+ * 是否为局部 UK 使用全表扫描检查冲突的插入值
+ * 对新购实例默认为 false
+ */
+ public final static BooleanConfigParam DML_GET_DUP_FOR_LOCAL_UK_WITH_FULL_TABLE_SCAN = new BooleanConfigParam(
+ ConnectionProperties.DML_GET_DUP_FOR_LOCAL_UK_WITH_FULL_TABLE_SCAN,
+ true,
+ false);
+
/**
* 是否使用 GSI 检查冲突的插入值
*/
@@ -718,7 +789,23 @@ public class ConnectionParams {
*/
public final static BooleanConfigParam FORBID_DDL_WITH_CCI = new BooleanConfigParam(
ConnectionProperties.FORBID_DDL_WITH_CCI,
- true,
+ false,
+ true);
+
+ /**
+ * 是否在执行repartition的时候重建CCI
+ */
+ public final static BooleanConfigParam REBUILD_CCI_WHEN_REPARTITION = new BooleanConfigParam(
+ ConnectionProperties.REBUILD_CCI_WHEN_REPARTITION,
+ false,
+ true);
+
+ /**
+ * 是否允许在 CCI 上执行 DROP/TRUNCATE PARTITION 删除/清空数据,会造成主表和分区表数据不一致
+ */
+ public final static BooleanConfigParam ENABLE_DROP_TRUNCATE_CCI_PARTITION = new BooleanConfigParam(
+ ConnectionProperties.ENABLE_DROP_TRUNCATE_CCI_PARTITION,
+ false,
true);
/**
@@ -1119,6 +1206,20 @@ public class ConnectionParams {
true
);
+ public static final IntConfigParam COLUMNAR_TSO_UPDATE_DELAY = new IntConfigParam(
+ ConnectionProperties.COLUMNAR_TSO_UPDATE_DELAY,
+ 0,
+ null,
+ 0, // no delay by default
+ true
+ );
+
+ public static final BooleanConfigParam ENABLE_COLUMNAR_DEBUG = new BooleanConfigParam(
+ ConnectionProperties.ENABLE_COLUMNAR_DEBUG,
+ false,
+ true
+ );
+
/**
* 开始清理事务日志的时间段(默认 00:00-00:10)
*/
@@ -1132,6 +1233,14 @@ public class ConnectionParams {
false,
true);
+ /**
+ * copy modify with HINT NODE(0) TO SINGLE GROUP
+ */
+ public static final BooleanConfigParam COPY_MODIFY_NODE0_TO_SINGLE = new BooleanConfigParam(
+ ConnectionProperties.COPY_MODIFY_NODE0_TO_SINGLE,
+ false,
+ true);
+
public static void addSupportedParam(ConfigParam param) {
SUPPORTED_PARAMS.put(param.getName(), param);
}
@@ -1253,6 +1362,11 @@ public static void addSupportedParam(ConfigParam param) {
true,
false);
+ public static final BooleanConfigParam SCALE_OUT_GENERATE_MULTIPLE_TO_GROUP_JOB =
+ new BooleanConfigParam(ConnectionProperties.SCALE_OUT_GENERATE_MULTIPLE_TO_GROUP_JOB,
+ true,
+ false);
+
public final static BooleanConfigParam BACKFILL_USE_RETURNING = new BooleanConfigParam(
ConnectionProperties.BACKFILL_USE_RETURNING,
true,
@@ -1297,12 +1411,27 @@ public static void addSupportedParam(ConfigParam param) {
1L, Long.MAX_VALUE, 1000000L, false);
/**
- * max physcial table sample size for backfill
+ * max physcial table sample rows for backfill
*/
- public static final LongConfigParam BACKFILL_MAX_SAMPLE_SIZE =
- new LongConfigParam(ConnectionProperties.BACKFILL_MAX_SAMPLE_SIZE,
+ public static final LongConfigParam BACKFILL_MAX_SAMPLE_ROWS =
+ new LongConfigParam(ConnectionProperties.BACKFILL_MAX_SAMPLE_ROWS,
10000L, Long.MAX_VALUE, 100000L, false);
+ /**
+ * max physcial table sample rows for backfill pk range task
+ */
+ public static final LongConfigParam BACKFILL_MAX_SAMPLE_ROWS_FOR_PK_RANGE =
+ new LongConfigParam(ConnectionProperties.BACKFILL_MAX_SAMPLE_ROWS_FOR_PK_RANGE,
+ 10000L, Long.MAX_VALUE, 100000L, false);
+
+ public static final StringConfigParam BACKFILL_MAX_PK_RANGE_SIZE =
+ new StringConfigParam(ConnectionProperties.BACKFILL_MAX_PK_RANGE_SIZE,
+ "64kB",
+ false);
+
+ public static final StringConfigParam BACKFILL_MAX_TASK_PK_RANGE_SIZE =
+ new StringConfigParam(ConnectionProperties.BACKFILL_MAX_TASK_PK_RANGE_SIZE,
+ "64MB", false);
/**
* check target table after scaleout's backfill
*/
@@ -1321,6 +1450,63 @@ public static void addSupportedParam(ConfigParam param) {
true,
false);
+ public static final BooleanConfigParam GSI_BACKFILL_OVERRIDE_DDL_PARAMS =
+ new BooleanConfigParam(ConnectionProperties.GSI_BACKFILL_OVERRIDE_DDL_PARAMS,
+ true,
+ false);
+
+ /**
+ * GSI backfill build local index later
+ */
+ public static final BooleanConfigParam GSI_BUILD_LOCAL_INDEX_LATER =
+ new BooleanConfigParam(ConnectionProperties.GSI_BUILD_LOCAL_INDEX_LATER,
+ false,
+ false);
+
+ /**
+ * GSI backfill use pk range split
+ */
+ public static final BooleanConfigParam GSI_BACKFILL_BY_PK_RANGE =
+ new BooleanConfigParam(ConnectionProperties.GSI_BACKFILL_BY_PK_RANGE,
+ false,
+ false);
+
+ /**
+ * GSI backfill use pk range split
+ */
+ public static final BooleanConfigParam GSI_BACKFILL_BY_PARTITION =
+ new BooleanConfigParam(ConnectionProperties.GSI_BACKFILL_BY_PARTITION,
+ false,
+ false);
+
+ /**
+ * GSI backfill max paramllesim
+ */
+ public static final IntConfigParam GSI_JOB_MAX_PARALLELISM =
+ new IntConfigParam(ConnectionProperties.GSI_JOB_MAX_PARALLELISM,
+ 1,
+ 4096,
+ 4,
+ false);
+
+ /**
+ * GSI backfill max paramllesim
+ */
+ public static final IntConfigParam GSI_PK_RANGE_CPU_ACQUIRE =
+ new IntConfigParam(ConnectionProperties.GSI_PK_RANGE_CPU_ACQUIRE,
+ 1,
+ 100,
+ 10,
+ false);
+
+ /**
+ * GSI backfill max paramllesim
+ */
+ public static final BooleanConfigParam GSI_PK_RANGE_LOCK_READ =
+ new BooleanConfigParam(ConnectionProperties.GSI_PK_RANGE_LOCK_READ,
+ true,
+ false);
+
public static IntConfigParam FASTCHECKER_THREAD_POOL_SIZE =
new IntConfigParam(ConnectionProperties.FASTCHECKER_THREAD_POOL_SIZE,
1, 10, 1, false);
@@ -1329,13 +1515,6 @@ public static void addSupportedParam(ConfigParam param) {
new IntConfigParam(ConnectionProperties.FASTCHECKER_BATCH_TIMEOUT_RETRY_TIMES,
1, 10, 4, false);
- /**
- * CHECK GLOBAL INDEX use fastchecker
- */
- public static BooleanConfigParam CHECK_GLOBAL_INDEX_USE_FASTCHECKER =
- new BooleanConfigParam(ConnectionProperties.CHECK_GLOBAL_INDEX_USE_FASTCHECKER,
- true,
- false);
/**
* check whether enable the scaleout feature, could disable/enable it from diamond/metadb
@@ -1401,12 +1580,12 @@ public static void addSupportedParam(ConfigParam param) {
ConnectionProperties.SCALEOUT_TASK_PARALLELISM,
-1L,
Long.MAX_VALUE,
- 0L,
+ 16L,
false);
public static final LongConfigParam TABLEGROUP_TASK_PARALLELISM = new LongConfigParam(
ConnectionProperties.TABLEGROUP_TASK_PARALLELISM,
- -1L, 1024L, 0L, false);
+ -1L, 1024L, 16L, false);
/**
* batch size for scaleout check procedure
@@ -1506,6 +1685,14 @@ public static void addSupportedParam(ConfigParam param) {
false,
false);
+ public static final BooleanConfigParam UNIQUE_GSI_WITH_PRIMARY_KEY = new BooleanConfigParam(
+ ConnectionProperties.UNIQUE_GSI_WITH_PRIMARY_KEY,
+ true,
+ false);
+
+ /**
+ * allow change/modify columns in which is also in GSI.
+ */
public static final BooleanConfigParam ALLOW_LOOSE_ALTER_COLUMN_WITH_GSI = new BooleanConfigParam(
ConnectionProperties.ALLOW_LOOSE_ALTER_COLUMN_WITH_GSI,
false,
@@ -1599,7 +1786,7 @@ public static void addSupportedParam(ConfigParam param) {
public static final LongConfigParam GSI_BACKFILL_BATCH_SIZE = new LongConfigParam(
ConnectionProperties.GSI_BACKFILL_BATCH_SIZE,
16L,
- 4096L,
+ 1024L * 1024,
1024L,
false);
@@ -1923,7 +2110,7 @@ public static void addSupportedParam(ConfigParam param) {
ConnectionProperties.SKIP_PHYSICAL_ANALYZE, false, true);
public static final IntConfigParam STATISTIC_EXPIRE_TIME = new IntConfigParam(
- ConnectionProperties.STATISTIC_EXPIRE_TIME, 1, null, 8 * 24 * 60 * 60, true);
+ ConnectionProperties.STATISTIC_EXPIRE_TIME, 1, null, 4 * 24 * 60 * 60, true);
public static final LongConfigParam CACHELINE_INDICATE_UPDATE_TIME = new LongConfigParam(
ConnectionProperties.CACHELINE_INDICATE_UPDATE_TIME, 1L, null, 0L, true);
@@ -1937,11 +2124,14 @@ public static void addSupportedParam(ConfigParam param) {
public static final FloatConfigParam SAMPLE_PERCENTAGE = new FloatConfigParam(
ConnectionProperties.SAMPLE_PERCENTAGE, -1f, 100f, -1f, true);
+ public static final StringConfigParam DN_HINT = new StringConfigParam(
+ ConnectionProperties.DN_HINT, "", true);
+
public static final FloatConfigParam BACKFILL_MAX_SAMPLE_PERCENTAGE = new FloatConfigParam(
ConnectionProperties.BACKFILL_MAX_SAMPLE_PERCENTAGE, -1f, 100f, 10f, true);
public static final BooleanConfigParam ENABLE_INNODB_BTREE_SAMPLING = new BooleanConfigParam(
- ConnectionProperties.ENABLE_INNODB_BTREE_SAMPLING, false, true);
+ ConnectionProperties.ENABLE_INNODB_BTREE_SAMPLING, true, true);
public static final IntConfigParam HISTOGRAM_MAX_SAMPLE_SIZE = new IntConfigParam(
ConnectionProperties.HISTOGRAM_MAX_SAMPLE_SIZE, 1000, Integer.MAX_VALUE, 100000, true);
@@ -1956,7 +2146,7 @@ public static void addSupportedParam(ConfigParam param) {
ConnectionProperties.ENABLE_BKA_JOIN, true, true);
public static final BooleanConfigParam ENABLE_REMOVE_JOIN_CONDITION = new BooleanConfigParam(
- ConnectionProperties.ENABLE_REMOVE_JOIN_CONDITION, true, true);
+ ConnectionProperties.ENABLE_REMOVE_JOIN_CONDITION, false, true);
public static final BooleanConfigParam ENABLE_BKA_PRUNING = new BooleanConfigParam(
ConnectionProperties.ENABLE_BKA_PRUNING, true, true);
@@ -2041,6 +2231,12 @@ public static void addSupportedParam(ConfigParam param) {
public static final BooleanConfigParam ENABLE_LV_SUBQUERY_UNWRAP = new BooleanConfigParam(
ConnectionProperties.ENABLE_LV_SUBQUERY_UNWRAP, true, true);
+ public static final BooleanConfigParam ENABLE_AUTO_FORCE_INDEX = new BooleanConfigParam(
+ ConnectionProperties.ENABLE_AUTO_FORCE_INDEX, false, true);
+
+ public static final BooleanConfigParam ENABLE_DELETE_FORCE_CC_INDEX = new BooleanConfigParam(
+ ConnectionProperties.ENABLE_DELETE_FORCE_CC_INDEX, false, true);
+
public static final BooleanConfigParam EXPLAIN_PRUNING_DETAIL = new BooleanConfigParam(
ConnectionProperties.EXPLAIN_PRUNING_DETAIL, false, true);
@@ -2059,8 +2255,11 @@ public static void addSupportedParam(ConfigParam param) {
public static final BooleanConfigParam ENABLE_SORT_AGG = new BooleanConfigParam(
ConnectionProperties.ENABLE_SORT_AGG, true, true);
- public static final BooleanConfigParam PARTIAL_AGG_ONLY = new BooleanConfigParam(
- ConnectionProperties.PARTIAL_AGG_ONLY, false, true);
+ public static final BooleanConfigParam PREFER_PUSH_AGG = new BooleanConfigParam(
+ ConnectionProperties.PREFER_PUSH_AGG, true, true);
+
+ public static final BooleanConfigParam PREFER_PARTIAL_AGG = new BooleanConfigParam(
+ ConnectionProperties.PREFER_PARTIAL_AGG, true, true);
public static final IntConfigParam PARTIAL_AGG_SHARD = new IntConfigParam(
ConnectionProperties.PARTIAL_AGG_SHARD, 0, Integer.MAX_VALUE, 6, true);
@@ -2068,6 +2267,15 @@ public static void addSupportedParam(ConfigParam param) {
public static final BooleanConfigParam ENABLE_PARTIAL_AGG = new BooleanConfigParam(
ConnectionProperties.ENABLE_PARTIAL_AGG, true, true);
+ public static final BooleanConfigParam ENABLE_TOPN = new BooleanConfigParam(
+ ConnectionProperties.ENABLE_TOPN, true, true);
+
+ public static final BooleanConfigParam ENABLE_LIMIT = new BooleanConfigParam(
+ ConnectionProperties.ENABLE_LIMIT, true, true);
+
+ public static final BooleanConfigParam ENABLE_PARTIAL_LIMIT = new BooleanConfigParam(
+ ConnectionProperties.ENABLE_PARTIAL_LIMIT, true, true);
+
public static final FloatConfigParam PARTIAL_AGG_SELECTIVITY_THRESHOLD = new FloatConfigParam(
ConnectionProperties.PARTIAL_AGG_SELECTIVITY_THRESHOLD, 0f, 1f, 0.2f, true);
@@ -2128,8 +2336,8 @@ public static void addSupportedParam(ConfigParam param) {
public static final BooleanConfigParam ENABLE_PUSH_AGG = new BooleanConfigParam(
ConnectionProperties.ENABLE_PUSH_AGG, true, true);
- public static final IntConfigParam PUSH_AGG_INPUT_ROW_COUNT_THRESHOLD = new IntConfigParam(
- ConnectionProperties.PUSH_AGG_INPUT_ROW_COUNT_THRESHOLD, 0, Integer.MAX_VALUE, 10000, true);
+ public static final LongConfigParam PUSH_AGG_INPUT_ROW_COUNT_THRESHOLD = new LongConfigParam(
+ ConnectionProperties.PUSH_AGG_INPUT_ROW_COUNT_THRESHOLD, 0L, Long.MAX_VALUE, 10000L, true);
public static final BooleanConfigParam ENABLE_CBO_PUSH_AGG = new BooleanConfigParam(
ConnectionProperties.ENABLE_CBO_PUSH_AGG, true, true);
@@ -2232,9 +2440,13 @@ public static void addSupportedParam(ConfigParam param) {
false,
true);
+ public static final LongConfigParam HOT_GSI_EVOLUTION_THRESHOLD =
+ new LongConfigParam(ConnectionProperties.HOT_GSI_EVOLUTION_THRESHOLD,
+ 0L, 10000000L, 10000L, true);
+
public static final BooleanConfigParam ENABLE_EXPRESSION_CONSTANT_FOLD =
new BooleanConfigParam(ConnectionProperties.ENABLE_EXPRESSION_CONSTANT_FOLD,
- false, true);
+ true, true);
public static final BooleanConfigParam ENABLE_SPM_BACKGROUND_TASK = new BooleanConfigParam(
ConnectionProperties.ENABLE_SPM_BACKGROUND_TASK,
@@ -2394,6 +2606,12 @@ public static void addSupportedParam(ConfigParam param) {
public static final BooleanConfigParam INSERT_SELECT_SELF_BY_PARALLEL = new BooleanConfigParam(
ConnectionProperties.INSERT_SELECT_SELF_BY_PARALLEL, false, true);
+ /**
+ * 是否允许 Insert select 包含flash black时下推执行。RR隔离级别,dn insert select会变成当前读,默认不允许下推
+ */
+ public static final BooleanConfigParam ENABLE_INSERT_SELECT_WITH_FLASHBACK_PUSH_DOWN = new BooleanConfigParam(
+ ConnectionProperties.ENABLE_INSERT_SELECT_WITH_FLASHBACK_PUSH_DOWN, false, true);
+
/**
* 是否允许 Insert 列重复
*/
@@ -2575,9 +2793,12 @@ public static void addSupportedParam(ConfigParam param) {
public static final IntConfigParam POLARDBX_PARALLELISM = new IntConfigParam(
ConnectionProperties.POLARDBX_PARALLELISM, 0, 128, -1, true);
- public static final BooleanConfigParam POLARDBX_SLAVE_INSTANCE_FIRST = new BooleanConfigParam(
- ConnectionProperties.POLARDBX_SLAVE_INSTANCE_FIRST, true, true);
-
+ /**
+ * 0 - close
+ * 1 - sql
+ * 2 - pipeline
+ * 3 - operator
+ */
public static final IntConfigParam MPP_METRIC_LEVEL = new IntConfigParam(
ConnectionProperties.MPP_METRIC_LEVEL, 0, 3, 3, true);
@@ -2654,14 +2875,6 @@ public static void addSupportedParam(ConfigParam param) {
true,
true);
- /**
- * where use plan cache for columnar plan
- */
- public static final BooleanConfigParam ENABLE_COLUMNAR_PLAN_CACHE = new BooleanConfigParam(
- ConnectionProperties.ENABLE_COLUMNAR_PLAN_CACHE,
- false,
- true);
-
public static final BooleanConfigParam ENABLE_COLUMNAR_PULL_UP_PROJECT = new BooleanConfigParam(
ConnectionProperties.ENABLE_COLUMNAR_PULL_UP_PROJECT,
true,
@@ -2771,6 +2984,12 @@ public static void addSupportedParam(ConfigParam param) {
true
);
+ public static final BooleanConfigParam BROADCAST_RANDOM_READ_IN_LOGICALVIEW = new BooleanConfigParam(
+ ConnectionProperties.BROADCAST_RANDOM_READ_IN_LOGICALVIEW,
+ false,
+ true
+ );
+
public static final BooleanConfigParam ENABLE_LOCAL_PARTITION_WISE_JOIN = new BooleanConfigParam(
ConnectionProperties.ENABLE_LOCAL_PARTITION_WISE_JOIN, true, true);
@@ -2941,18 +3160,18 @@ public static void addSupportedParam(ConfigParam param) {
256 * 1024 * 1024L, true);
/**
- * x-protocol max DN concurrent. (default 500) (default 2000 for columnar)
+ * x-protocol max DN concurrent. (default 2000) (default 2000 for columnar)
*/
public static final LongConfigParam XPROTO_MAX_DN_CONCURRENT = new LongConfigParam(
ConnectionProperties.XPROTO_MAX_DN_CONCURRENT, 1L, Long.MAX_VALUE,
2000L, true);
/**
- * x-protocol max wait connection per DN. (default 100) (default 200 for columnar)
+ * x-protocol max wait connection per DN. (default 2000) (default 200 for columnar)
*/
public static final LongConfigParam XPROTO_MAX_DN_WAIT_CONNECTION = new LongConfigParam(
ConnectionProperties.XPROTO_MAX_DN_WAIT_CONNECTION, 1L, Long.MAX_VALUE,
- 100L, true);
+ 2000L, true);
/**
* X-Protocol always keep upper filter when use XPlan. (default true)
@@ -3042,8 +3261,18 @@ public static class ConnectionParamValues {
public static final BooleanConfigParam ENABLE_OSS_MOCK_COLUMNAR = new BooleanConfigParam(
ConnectionProperties.ENABLE_OSS_MOCK_COLUMNAR, false, true);
+ public static final BooleanConfigParam ENABLE_COLUMNAR_CORRELATE = new BooleanConfigParam(
+ ConnectionProperties.ENABLE_COLUMNAR_CORRELATE, false, true);
+
public static final BooleanConfigParam ENABLE_COLUMNAR_OPTIMIZER = new BooleanConfigParam(
- ConnectionProperties.ENABLE_COLUMNAR_OPTIMIZER, true, true);
+ ConnectionProperties.ENABLE_COLUMNAR_OPTIMIZER, false, true);
+
+ /**
+ * The parameter ENABLE_COLUMNAR_OPTIMIZER_WITH_COLUMNAR is influenced by ALLOW_COLUMNAR_BIND_MASTER,
+ * and under normal circumstances, it is advised not to set the ENABLE_COLUMNAR_OPTIMIZER_WITH_COLUMNAR variable.
+ */
+ public static final BooleanConfigParam ENABLE_COLUMNAR_OPTIMIZER_WITH_COLUMNAR = new BooleanConfigParam(
+ ConnectionProperties.ENABLE_COLUMNAR_OPTIMIZER_WITH_COLUMNAR, false, true);
public static final StringConfigParam EXECUTOR_MODE = new StringConfigParam(
ConnectionProperties.EXECUTOR_MODE, "NONE", true);
@@ -3221,11 +3450,8 @@ public static class ConnectionParamValues {
new BooleanConfigParam(ConnectionProperties.STATISTICS_DUMP_IGNORE_STRING, false, true);
/**
- * 是否开启 SELECT INTO OUTFILE 默认关闭
+ * Use the range-format to show hash/key partitions
*/
- public static final BooleanConfigParam ENABLE_SELECT_INTO_OUTFILE =
- new BooleanConfigParam(ConnectionProperties.ENABLE_SELECT_INTO_OUTFILE, false, true);
-
public static final BooleanConfigParam SHOW_HASH_PARTITIONS_BY_RANGE = new BooleanConfigParam(
ConnectionProperties.SHOW_HASH_PARTITIONS_BY_RANGE,
false,
@@ -3296,12 +3522,16 @@ public static class ConnectionParamValues {
true
);
- public static final BooleanConfigParam ENABLE_PARTITION_MANAGEMENT = new BooleanConfigParam(
- ConnectionProperties.ENABLE_PARTITION_MANAGEMENT,
+ /**
+ * Running time window of balancer
+ */
+ public static final BooleanConfigParam SHOW_DDL_ENGINE_RESOURCES = new BooleanConfigParam(
+ ConnectionProperties.SHOW_DDL_ENGINE_RESOURCES,
false,
true
);
+
/**
* Allow move the single table with locality='balance_single_table=on' during scale-out/scale-in
*/
@@ -3509,11 +3739,18 @@ public static class ConnectionParamValues {
public static final IntConfigParam AUTO_COLLECT_NDV_SKETCH = new IntConfigParam(
ConnectionProperties.AUTO_COLLECT_NDV_SKETCH, 1, Integer.MAX_VALUE, 24, true);
- public static final BooleanConfigParam ENABLE_NDV_USE_COLUMNAR = new BooleanConfigParam(
- ConnectionProperties.ENABLE_NDV_USE_COLUMNAR, false, true);
+ /**
+ * call com.alibaba.polardbx.optimizer.config.table.statistic.inf.NDVSketchService#updateAllShardParts
+ * using 'analyze table', for test only
+ */
+ public static final BooleanConfigParam ANALYZE_TEST_UPDATE = new BooleanConfigParam(
+ ConnectionProperties.ANALYZE_TEST_UPDATE, false, true);
public static final BooleanConfigParam ENABLE_MPP_NDV_USE_COLUMNAR = new BooleanConfigParam(
- ConnectionProperties.ENABLE_MPP_NDV_USE_COLUMNAR, false, true);
+ ConnectionProperties.ENABLE_MPP_NDV_USE_COLUMNAR, true, true);
+
+ public static final BooleanConfigParam MPP_NDV_USE_COLUMNAR_LIMIT = new BooleanConfigParam(
+ ConnectionProperties.MPP_NDV_USE_COLUMNAR_LIMIT, true, true);
/**
* expire time(sec) for ndv sketch info
@@ -3611,6 +3848,9 @@ public static class ConnectionParamValues {
public static final BooleanConfigParam ENABLE_LOGICALVIEW_COST = new BooleanConfigParam(
ConnectionProperties.ENABLE_LOGICALVIEW_COST, true, true);
+ public static final StringConfigParam DEFAULT_TTL_SCHEDULE_CRON_EXPR = new StringConfigParam(
+ ConnectionProperties.DEFAULT_TTL_SCHEDULE_CRON_EXPR, "0 0 1 * * ? *", true);
+
public static final BooleanConfigParam TABLEGROUP_REORG_CHECK_AFTER_BACKFILL = new BooleanConfigParam(
ConnectionProperties.TABLEGROUP_REORG_CHECK_AFTER_BACKFILL, true, true);
@@ -3672,7 +3912,7 @@ public static class ConnectionParamValues {
new IntConfigParam(ConnectionProperties.CHANGE_SET_APPLY_BATCH, 1, 10 * 1024, 128, false);
public static final LongConfigParam CHANGE_SET_MEMORY_LIMIT = new LongConfigParam(
- ConnectionProperties.CHANGE_SET_MEMORY_LIMIT, 1024L, 16 * 1024 * 1024L, 1024 * 1024L, false);
+ ConnectionProperties.CHANGE_SET_MEMORY_LIMIT, 1024L, 16 * 1024 * 1024L, 4 * 1024 * 1024L, false);
public static final BooleanConfigParam CN_ENABLE_CHANGESET =
new BooleanConfigParam(ConnectionProperties.CN_ENABLE_CHANGESET, true, true);
@@ -3845,6 +4085,25 @@ public static class ConnectionParamValues {
public static final BooleanConfigParam ENABLE_DECIMAL_FAST_VEC = new BooleanConfigParam(
ConnectionProperties.ENABLE_DECIMAL_FAST_VEC, false, true);
+ /**
+ * perform type conversion automatically
+ * when then column type does not match vectorized IN expression value type
+ */
+ public static final BooleanConfigParam ENABLE_IN_VEC_AUTO_TYPE = new BooleanConfigParam(
+ ConnectionProperties.ENABLE_IN_VEC_AUTO_TYPE, false, true);
+
+ /**
+ * enable short-circuit evaluation in AndVectorizedExpression
+ */
+ public static final BooleanConfigParam ENABLE_AND_FAST_VEC = new BooleanConfigParam(
+ ConnectionProperties.ENABLE_AND_FAST_VEC, false, true);
+
+ /**
+ * enable short-circuit evaluation in OrVectorizedExpression
+ */
+ public static final BooleanConfigParam ENABLE_OR_FAST_VEC = new BooleanConfigParam(
+ ConnectionProperties.ENABLE_OR_FAST_VEC, false, true);
+
public static final BooleanConfigParam ENABLE_UNIQUE_HASH_KEY = new BooleanConfigParam(
ConnectionProperties.ENABLE_UNIQUE_HASH_KEY, false, true);
@@ -3873,12 +4132,21 @@ public static class ConnectionParamValues {
public static final BooleanConfigParam ALLOW_REPLACE_ARCHIVE_TABLE = new BooleanConfigParam(
ConnectionProperties.ALLOW_REPLACE_ARCHIVE_TABLE, false, true);
+ public static final BooleanConfigParam CHECK_ARCHIVE_PARTITION_READY = new BooleanConfigParam(
+ ConnectionProperties.CHECK_ARCHIVE_PARTITION_READY, true, true);
+
/**
* Allow create table like a file-store table.
*/
public static final BooleanConfigParam ALLOW_CREATE_TABLE_LIKE_FILE_STORE = new BooleanConfigParam(
ConnectionProperties.ALLOW_CREATE_TABLE_LIKE_FILE_STORE, false, true);
+ /**
+ * Label if allow create table like a ttl-defined table and auto ignore the ttl definition
+ */
+ public static final BooleanConfigParam ALLOW_CREATE_TABLE_LIKE_IGNORE_ARCHIVE_CCI = new BooleanConfigParam(
+ ConnectionProperties.ALLOW_CREATE_TABLE_LIKE_IGNORE_ARCHIVE_CCI, false, true);
+
public static final BooleanConfigParam ENABLE_PARTITIONS_HEATMAP_COLLECTION = new BooleanConfigParam(
ConnectionProperties.ENABLE_PARTITIONS_HEATMAP_COLLECTION, true, true);
@@ -3897,6 +4165,9 @@ public static class ConnectionParamValues {
ConnectionProperties.PARTITIONS_HEATMAP_COLLECTION_MAX_SINGLE_LOGIC_SCHEMA_COUNT, 0, Integer.MAX_VALUE, 8000,
true);
+ public static final BooleanConfigParam ENABLE_LOG_SYSTEM_METRICS = new BooleanConfigParam(
+ ConnectionProperties.ENABLE_LOG_SYSTEM_METRICS, true, true);
+
/**
* the MAX size of IN expr being pruned
*/
@@ -3906,9 +4177,6 @@ public static class ConnectionParamValues {
public static final IntConfigParam MAX_IN_PRUNE_CACHE_SIZE = new IntConfigParam(
ConnectionProperties.MAX_IN_PRUNE_CACHE_SIZE, 0, Integer.MAX_VALUE, 200, true);
- public static final IntConfigParam MAX_IN_PRUNE_CACHE_TABLE_SIZE = new IntConfigParam(
- ConnectionProperties.MAX_IN_PRUNE_CACHE_TABLE_SIZE, 0, Integer.MAX_VALUE, 10, true);
-
public static final IntConfigParam REBALANCE_TASK_PARALISM = new IntConfigParam(
ConnectionProperties.REBALANCE_TASK_PARALISM, 1, 64, 2, true);
@@ -4116,6 +4384,47 @@ public static class ConnectionParamValues {
public static final IntConfigParam PREFETCH_EXECUTE_POLICY = new IntConfigParam(
ConnectionProperties.PREFETCH_EXECUTE_POLICY, -1, 3, -1, true);
+ /**
+ * Controls whether range scan is enabled.
+ * The parameter is initially set to enabled (true) and is mutable (true).
+ */
+ public static final BooleanConfigParam ENABLE_RANGE_SCAN = new BooleanConfigParam(
+ ConnectionProperties.ENABLE_RANGE_SCAN, true, true);
+
+ /**
+ * Controls whether range scan is enabled for dml.
+ * The parameter is initially set to disabled (false) and is mutable (true).
+ */
+ public static final BooleanConfigParam ENABLE_RANGE_SCAN_FOR_DML = new BooleanConfigParam(
+ ConnectionProperties.ENABLE_RANGE_SCAN_FOR_DML, false, true);
+
+ /**
+ * Controls the range scan mode.
+ * The parameter is initially set to empty (decided automatically) and is mutable (true).
+ */
+ public static final StringConfigParam RANGE_SCAN_MODE = new StringConfigParam(
+ ConnectionProperties.RANGE_SCAN_MODE,
+ "",
+ true
+ );
+
+ /**
+ * Controls the range scan adaptive policy.
+ * The parameter is initially set to empty (decided automatically) and is mutable (true).
+ */
+ public static final StringConfigParam RANGE_SCAN_ADAPTIVE_POLICY = new StringConfigParam(
+ ConnectionProperties.RANGE_SCAN_ADAPTIVE_POLICY,
+ "",
+ true
+ );
+
+ /**
+ * Controls the limit of using range scan serialized mode.
+ * The parameter is initially set to 100 and is mutable (true).
+ */
+ public static final IntConfigParam RANGE_SCAN_SERIALIZE_LIMIT = new IntConfigParam(
+ ConnectionProperties.RANGE_SCAN_SERIALIZE_LIMIT, 0, Integer.MAX_VALUE, 100, true);
+
public static final BooleanConfigParam ENABLE_REPLICA = new BooleanConfigParam(
ConnectionProperties.ENABLE_REPLICA, true, true);
@@ -4229,6 +4538,13 @@ public static class ConnectionParamValues {
10000,
true
);
+
+ public static final BooleanConfigParam ENABLE_COLUMNAR_MULTI_VERSION_PARTITION = new BooleanConfigParam(
+ ConnectionProperties.ENABLE_COLUMNAR_MULTI_VERSION_PARTITION,
+ true,
+ true
+ );
+
/**
* The policy of table scan: IO_PRIORITY, FILTER_PRIORITY, IO_ON_DEMAND.
*/
@@ -4250,10 +4566,11 @@ public static class ConnectionParamValues {
/**
* To enable the usage of in-flight block cache.
+ * May lead to concurrency safety issues.
*/
public static final BooleanConfigParam ENABLE_USE_IN_FLIGHT_BLOCK_CACHE = new BooleanConfigParam(
ConnectionProperties.ENABLE_USE_IN_FLIGHT_BLOCK_CACHE,
- true,
+ false,
true
);
@@ -4281,11 +4598,13 @@ public static class ConnectionParamValues {
/**
* If disabled, SliceBlock with dictionary will be converted to
- * SliceBlock with values
+ * SliceBlock with values.
+ *
+ * Merging a large number of local dictionaries can cause performance regression.
*/
public static final BooleanConfigParam ENABLE_COLUMNAR_SLICE_DICT = new BooleanConfigParam(
ConnectionProperties.ENABLE_COLUMNAR_SLICE_DICT,
- true,
+ false,
true
);
@@ -4369,6 +4688,14 @@ public static class ConnectionParamValues {
true
);
+ public static final LongConfigParam PREHEATED_CACHE_MAX_ENTRIES = new LongConfigParam(
+ ConnectionProperties.PREHEATED_CACHE_MAX_ENTRIES,
+ 16L,
+ Long.MAX_VALUE,
+ 4096L,
+ true
+ );
+
public static final BooleanConfigParam ENABLE_BLOCK_BUILDER_BATCH_WRITING = new BooleanConfigParam(
ConnectionProperties.ENABLE_BLOCK_BUILDER_BATCH_WRITING,
true,
@@ -4468,6 +4795,13 @@ public static class ConnectionParamValues {
false
);
+ public static final BooleanConfigParam ENABLE_STANDBY_BACKFILL = new BooleanConfigParam(
+ ConnectionProperties.ENABLE_STANDBY_BACKFILL,
+ true,
+ false
+ );
+
+
public static final BooleanConfigParam ENABLE_ROLLBACK_TO_READY = new BooleanConfigParam(
ConnectionProperties.ENABLE_ROLLBACK_TO_READY,
true,
@@ -4530,7 +4864,7 @@ public static class ConnectionParamValues {
public static final BooleanConfigParam PHYSICAL_BACKFILL_ENABLE = new BooleanConfigParam(
ConnectionProperties.PHYSICAL_BACKFILL_ENABLE,
- false,
+ true,
true);
public static final BooleanConfigParam PHYSICAL_BACKFILL_FROM_FOLLOWER = new BooleanConfigParam(
@@ -4582,11 +4916,32 @@ public static class ConnectionParamValues {
true,
true);
+ public static final LongConfigParam PHYSICAL_BACKFILL_IMPORT_TABLESPACE_IO_ADVISE = new LongConfigParam(
+ ConnectionProperties.PHYSICAL_BACKFILL_IMPORT_TABLESPACE_IO_ADVISE,
+ 10L,
+ 100L,
+ 40L,
+ true);
+
+ public static final LongConfigParam PHYSICAL_BACKFILL_PIPELINE_SIZE = new LongConfigParam(
+ ConnectionProperties.PHYSICAL_BACKFILL_PIPELINE_SIZE,
+ -1L, Long.MAX_VALUE, -1L, true);
+
+ public final static BooleanConfigParam DISCARD_TABLESPACE_USE_GROUP_CONCURRENT_BLOCK = new BooleanConfigParam(
+ ConnectionProperties.DISCARD_TABLESPACE_USE_GROUP_CONCURRENT_BLOCK,
+ true,
+ false);
+
public static final BooleanConfigParam PHYSICAL_BACKFILL_SPEED_TEST = new BooleanConfigParam(
ConnectionProperties.PHYSICAL_BACKFILL_SPEED_TEST,
false,
true);
+ public static final BooleanConfigParam ANALYZE_TABLE_AFTER_IMPORT_TABLESPACE = new BooleanConfigParam(
+ ConnectionProperties.ANALYZE_TABLE_AFTER_IMPORT_TABLESPACE,
+ true,
+ true);
+
/**
* rebalance start point
*/
@@ -4615,7 +4970,7 @@ public static class ConnectionParamValues {
public static final BooleanConfigParam ENABLE_DEADLOCK_DETECTION_80 = new BooleanConfigParam(
ConnectionProperties.ENABLE_DEADLOCK_DETECTION_80,
- false,
+ true,
true
);
@@ -4792,10 +5147,10 @@ public static class ConnectionParamValues {
);
/**
- * Enable oss table scan only returns deleted data in orc files.
+ * Enable oss table scan only returns deleted data in orc/csv files.
*/
- public static final BooleanConfigParam ENABLE_ORC_DELETED_SCAN = new BooleanConfigParam(
- ConnectionProperties.ENABLE_ORC_DELETED_SCAN,
+ public static final BooleanConfigParam ENABLE_OSS_DELETED_SCAN = new BooleanConfigParam(
+ ConnectionProperties.ENABLE_OSS_DELETED_SCAN,
false,
true
);
@@ -4809,12 +5164,6 @@ public static class ConnectionParamValues {
true
);
- public static final StringConfigParam FORCE_READ_ORC_FILE = new StringConfigParam(
- ConnectionProperties.FORCE_READ_ORC_FILE,
- null,
- true
- );
-
public static final BooleanConfigParam READ_CSV_ONLY = new BooleanConfigParam(
ConnectionProperties.READ_CSV_ONLY,
false,
@@ -4827,8 +5176,20 @@ public static class ConnectionParamValues {
true
);
- public static final BooleanConfigParam ENABLE_FAST_CCI_CHECKER = new BooleanConfigParam(
- ConnectionProperties.ENABLE_FAST_CCI_CHECKER,
+ public static final BooleanConfigParam READ_SPECIFIED_COLUMNAR_FILES = new BooleanConfigParam(
+ ConnectionProperties.READ_SPECIFIED_COLUMNAR_FILES,
+ false,
+ true
+ );
+
+ public static final BooleanConfigParam CCI_INCREMENTAL_CHECK = new BooleanConfigParam(
+ ConnectionProperties.CCI_INCREMENTAL_CHECK,
+ false,
+ true
+ );
+
+ public static final BooleanConfigParam ENABLE_CCI_FAST_CHECKER = new BooleanConfigParam(
+ ConnectionProperties.ENABLE_CCI_FAST_CHECKER,
true,
true
);
@@ -4839,6 +5200,12 @@ public static class ConnectionParamValues {
true
);
+ public static final BooleanConfigParam ENABLE_ACCURATE_REL_TYPE_TO_DATA_TYPE = new BooleanConfigParam(
+ ConnectionProperties.ENABLE_ACCURATE_REL_TYPE_TO_DATA_TYPE,
+ false,
+ true
+ );
+
public static final BooleanConfigParam FORCE_2PC_DURING_CCI_CHECK = new BooleanConfigParam(
ConnectionProperties.FORCE_2PC_DURING_CCI_CHECK,
false,
@@ -4853,7 +5220,7 @@ public static class ConnectionParamValues {
public static final BooleanConfigParam ENABLE_AUTO_COMMIT_TSO = new BooleanConfigParam(
ConnectionProperties.ENABLE_AUTO_COMMIT_TSO,
- true,
+ false,
true
);
@@ -4863,6 +5230,348 @@ public static class ConnectionParamValues {
true
);
- public static final BooleanConfigParam ENABLE_SINGLE_SHARD_WRITE = new BooleanConfigParam(
- ConnectionProperties.ENABLE_SINGLE_SHARD_WRITE, true, true);
+ public static final BooleanConfigParam FORBID_AUTO_COMMIT_TRX = new BooleanConfigParam(
+ ConnectionProperties.FORBID_AUTO_COMMIT_TRX,
+ false,
+ true
+ );
+
+ public static final BooleanConfigParam ENABLE_EXTERNAL_CONSISTENCY_FOR_WRITE_TRX = new BooleanConfigParam(
+ ConnectionProperties.ENABLE_EXTERNAL_CONSISTENCY_FOR_WRITE_TRX,
+ false,
+ true
+ );
+
+ public static final BooleanConfigParam ENABLE_INFO_SCHEMA_TABLES_STAT_COLLECTION = new BooleanConfigParam(
+ ConnectionProperties.ENABLE_INFO_SCHEMA_TABLES_STAT_COLLECTION,
+ false,
+ true);
+
+ //列存查询文件最新的append记录默认使用子查询方式,false情况使用join方式
+ public static final BooleanConfigParam SHOW_COLUMNAR_STATUS_USE_SUB_QUERY = new BooleanConfigParam(
+ ConnectionProperties.SHOW_COLUMNAR_STATUS_USE_SUB_QUERY,
+ true,
+ true);
+
+ public static final IntConfigParam TTL_GLOBAL_SELECT_WORKER_COUNT = new IntConfigParam(
+ ConnectionProperties.TTL_GLOBAL_SELECT_WORKER_COUNT,
+ 1,
+ 1024,
+ 4,
+ true
+ );
+
+ public static final IntConfigParam TTL_GLOBAL_DELETE_WORKER_COUNT = new IntConfigParam(
+ ConnectionProperties.TTL_GLOBAL_DELETE_WORKER_COUNT,
+ 1,
+ 1024,
+ 0,
+ true
+ );
+
+ public static final BooleanConfigParam TTL_ENABLE_AUTO_OPTIMIZE_TABLE_IN_TTL_JOB = new BooleanConfigParam(
+ ConnectionProperties.TTL_ENABLE_AUTO_OPTIMIZE_TABLE_IN_TTL_JOB,
+ false,
+ true
+ );
+
+ public static final BooleanConfigParam TTL_ENABLE_AUTO_EXEC_OPTIMIZE_TABLE_AFTER_ARCHIVING = new BooleanConfigParam(
+ ConnectionProperties.TTL_ENABLE_AUTO_EXEC_OPTIMIZE_TABLE_AFTER_ARCHIVING,
+ true,
+ true
+ );
+
+ public static final LongConfigParam TTL_TMP_TBL_MAX_DATA_LENGTH = new LongConfigParam(
+ ConnectionProperties.TTL_TMP_TBL_MAX_DATA_LENGTH,
+ 134217728L /*128M*/,
+ Long.MAX_VALUE,
+ 34359738368L,
+ true
+ );
+
+ public static final IntConfigParam TTL_OPTIMIZE_TABLE_PARALLELISM = new IntConfigParam(
+ ConnectionProperties.TTL_OPTIMIZE_TABLE_PARALLELISM,
+ 1,
+ Integer.MAX_VALUE,
+ 4,
+ true
+ );
+
+ public static final IntConfigParam TTL_TBL_MAX_DATA_FREE_PERCENT = new IntConfigParam(
+ ConnectionProperties.TTL_TBL_MAX_DATA_FREE_PERCENT,
+ 1,
+ Integer.MAX_VALUE,
+ 40,
+ true
+ );
+
+ public static final IntConfigParam TTL_INTRA_TASK_INTERRUPTION_MAX_WAIT_TIME = new IntConfigParam(
+ ConnectionProperties.TTL_INTRA_TASK_INTERRUPTION_MAX_WAIT_TIME,
+ 1,
+ Integer.MAX_VALUE,
+ 5000,
+ true
+ );
+
+ public static final IntConfigParam TTL_INTRA_TASK_MONITOR_EACH_ROUTE_WAIT_TIME = new IntConfigParam(
+ ConnectionProperties.TTL_INTRA_TASK_MONITOR_EACH_ROUTE_WAIT_TIME,
+ 1,
+ Integer.MAX_VALUE,
+ 1000,
+ true
+ );
+
+ public static final IntConfigParam TTL_SCHEDULED_JOB_MAX_PARALLELISM = new IntConfigParam(
+ ConnectionProperties.TTL_SCHEDULED_JOB_MAX_PARALLELISM,
+ 1,
+ 128,
+ 2,
+ true
+ );
+
+ public static final BooleanConfigParam TTL_DEBUG_USE_GSI_FOR_COLUMNAR_ARC_TBL = new BooleanConfigParam(
+ ConnectionProperties.TTL_DEBUG_USE_GSI_FOR_COLUMNAR_ARC_TBL,
+ false,
+ true);
+
+ public static final StringConfigParam TTL_DEBUG_CCI_SKIP_DDL_TASKS =
+ new StringConfigParam(ConnectionProperties.TTL_DEBUG_CCI_SKIP_DDL_TASKS,
+ "",
+ false);
+
+ public static final IntConfigParam TTL_JOB_DEFAULT_BATCH_SIZE = new IntConfigParam(
+ ConnectionProperties.TTL_JOB_DEFAULT_BATCH_SIZE,
+ 1,
+ Integer.MAX_VALUE,
+ 256,
+ true);
+
+ /**
+ * The interval count for computing minCleanupBound base on lowerBound(normalized minVal of ttl_col),
+ * that means the delta = ttlMinCleanupBoundIntervalCount * ttlUnit, is the delta interval between
+ * minCleanupBound and the lowerBound, default is 3
+ */
+ public static final IntConfigParam TTL_CLEANUP_BOUND_INTERVAL_COUNT = new IntConfigParam(
+ ConnectionProperties.TTL_CLEANUP_BOUND_INTERVAL_COUNT,
+ 1,
+ Integer.MAX_VALUE,
+ 3,
+ true);
+
+ /**
+ * Stop ttl-job scheduling for all ttl tables, used for handling critical situation
+ */
+ public static final BooleanConfigParam TTL_STOP_ALL_JOB_SCHEDULING = new BooleanConfigParam(
+ ConnectionProperties.TTL_STOP_ALL_JOB_SCHEDULING,
+ false,
+ true);
+
+ /**
+ * Label if use archive trans policy for all trans of ttl-job
+ */
+ public static final BooleanConfigParam TTL_USE_ARCHIVE_TRANS_POLICY = new BooleanConfigParam(
+ ConnectionProperties.TTL_USE_ARCHIVE_TRANS_POLICY,
+ true,
+ true);
+
+ /**
+ * The default merge_union_size for the select sql of fetch ttl-col lower bound
+ */
+ public static final IntConfigParam TTL_SELECT_MERGE_UNION_SIZE = new IntConfigParam(
+ ConnectionProperties.TTL_SELECT_MERGE_UNION_SIZE,
+ 1,
+ 64,
+ 2,
+ true
+ );
+
+ /**
+ * The label if use merge_concurrent for the select sql of fetch ttl-col lower bound
+ */
+ public static final BooleanConfigParam TTL_SELECT_MERGE_CONCURRENT = new BooleanConfigParam(
+ ConnectionProperties.TTL_SELECT_MERGE_CONCURRENT,
+ true,
+ true);
+
+ public static final StringConfigParam TTL_SELECT_STMT_HINT =
+ new StringConfigParam(ConnectionProperties.TTL_SELECT_STMT_HINT,
+ "/*+TDDL: GROUP_CONCURRENT_BLOCK=true PREFETCH_EXECUTE_POLICY=1 MERGE_UNION_SIZE=2 */",
+ false);
+
+ public static final StringConfigParam TTL_DELETE_STMT_HINT =
+ new StringConfigParam(ConnectionProperties.TTL_DELETE_STMT_HINT,
+ "/*+TDDL:cmd_extra(SOCKET_TIMEOUT=1800000)*/",
+ false);
+
+ public static final StringConfigParam TTL_INSERT_STMT_HINT =
+ new StringConfigParam(ConnectionProperties.TTL_INSERT_STMT_HINT,
+ "/*+TDDL:cmd_extra(SOCKET_TIMEOUT=1800000)*/",
+ false);
+
+ public static final StringConfigParam TTL_OPTIMIZE_TABLE_STMT_HINT =
+ new StringConfigParam(ConnectionProperties.TTL_OPTIMIZE_TABLE_STMT_HINT,
+ "/*+TDDL:cmd_extra(ENABLE_ASYNC_DDL=true, PURE_ASYNC_DDL_MODE=true, RETURN_JOB_ID_ON_ASYNC_DDL_MODE=true, OPTIMIZE_TABLE_PARALLELISM=4, SOCKET_TIMEOUT=1800000)*/",
+ false);
+
+ public static final StringConfigParam TTL_ALTER_ADD_PART_STMT_HINT =
+ new StringConfigParam(ConnectionProperties.TTL_ALTER_ADD_PART_STMT_HINT,
+ "/*+TDDL:cmd_extra(SOCKET_TIMEOUT=1800000)*/",
+ false);
+
+ public static final LongConfigParam TTL_GROUP_PARALLELISM_ON_DQL_CONN =
+ new LongConfigParam(ConnectionProperties.TTL_GROUP_PARALLELISM_ON_DQL_CONN,
+ 0L,
+ 1024L,
+ 1L,
+ false);
+
+ public static final LongConfigParam TTL_GROUP_PARALLELISM_ON_DML_CONN =
+ new LongConfigParam(ConnectionProperties.TTL_GROUP_PARALLELISM_ON_DML_CONN,
+ 0L,
+ 1024L,
+ 0L,
+ false);
+
+ public static final BooleanConfigParam TTL_ADD_MAXVAL_PART_ON_CCI_CREATING =
+ new BooleanConfigParam(ConnectionProperties.TTL_ADD_MAXVAL_PART_ON_CCI_CREATING,
+ true,
+ true);
+
+ public static final BooleanConfigParam TTL_FORCE_DROP_ARCHIVE_CCI =
+ new BooleanConfigParam(ConnectionProperties.TTL_FORCE_DROP_ARCHIVE_CCI,
+ false,
+ true);
+
+ public static final BooleanConfigParam TTL_FORCE_DROP_ARCHIVE_CCI_VIEW =
+ new BooleanConfigParam(ConnectionProperties.TTL_FORCE_DROP_ARCHIVE_CCI_VIEW,
+ false,
+ true);
+
+ public static final LongConfigParam TTL_MAX_WAIT_ACQUIRE_RATE_PERMITS_PERIODS =
+ new LongConfigParam(ConnectionProperties.TTL_MAX_WAIT_ACQUIRE_RATE_PERMITS_PERIODS,
+ 0L,
+ Long.MAX_VALUE,
+ 5000L,
+ false);
+
+ public static final LongConfigParam TTL_CLEANUP_ROWS_SPEED_LIMIT_EACH_DN =
+ new LongConfigParam(ConnectionProperties.TTL_CLEANUP_ROWS_SPEED_LIMIT_EACH_DN,
+ 0L,
+ Long.MAX_VALUE,
+ 1024L,
+ false);
+
+ public static final BooleanConfigParam TTL_ENABLE_CLEANUP_ROWS_SPEED_LIMIT =
+ new BooleanConfigParam(ConnectionProperties.TTL_ENABLE_CLEANUP_ROWS_SPEED_LIMIT,
+ true,
+ true);
+
+ public static final BooleanConfigParam TTL_IGNORE_MAINTAIN_WINDOW_IN_DDL_JOB =
+ new BooleanConfigParam(ConnectionProperties.TTL_IGNORE_MAINTAIN_WINDOW_IN_DDL_JOB,
+ true,
+ true);
+
+ /**
+ * The ratio of global-delete-worker / rw-dn-count, default is 2
+ */
+ public static final IntConfigParam TTL_GLOBAL_WORKER_DN_RATIO = new IntConfigParam(
+ ConnectionProperties.TTL_GLOBAL_WORKER_DN_RATIO,
+ 1,
+ 128,
+ 2,
+ true
+ );
+
+ public static final IntConfigParam TTL_DEFAULT_ARC_PRE_ALLOCATE_COUNT = new IntConfigParam(
+ ConnectionProperties.TTL_DEFAULT_ARC_PRE_ALLOCATE_COUNT,
+ 1,
+ 8192,
+ 12,
+ true
+ );
+
+ public static final IntConfigParam TTL_DEFAULT_ARC_POST_ALLOCATE_COUNT = new IntConfigParam(
+ ConnectionProperties.TTL_DEFAULT_ARC_POST_ALLOCATE_COUNT,
+ 1,
+ 8192,
+ 64,
+ true
+ );
+
+ public static final BooleanConfigParam TTL_ENABLE_AUTO_ADD_PARTS_FOR_ARC_CCI =
+ new BooleanConfigParam(ConnectionProperties.TTL_ENABLE_AUTO_ADD_PARTS_FOR_ARC_CCI,
+ true,
+ true);
+
+ public static final StringConfigParam TTL_DEBUG_CURRENT_DATETIME =
+ new StringConfigParam(ConnectionProperties.TTL_DEBUG_CURRENT_DATETIME,
+ "",
+ false);
+
+
+ public static final BooleanConfigParam TTL_FORBID_DROP_TTL_TBL_WITH_ARC_CCI =
+ new BooleanConfigParam(ConnectionProperties.TTL_FORBID_DROP_TTL_TBL_WITH_ARC_CCI,
+ true,
+ true);
+
+ /**
+ * Columnar storage read-only instance's maximum sustainable QPS
+ */
+ public static final LongConfigParam COLUMNAR_CLUSTER_MAXIMUM_QPS =
+ new LongConfigParam(ConnectionProperties.COLUMNAR_CLUSTER_MAXIMUM_QPS,
+ -1L,
+ Long.MAX_VALUE,
+ -1L,
+ true);
+
+ /**
+ * Columnar storage read-only instance's maximum sustainable concurrency
+ */
+ public static final LongConfigParam COLUMNAR_CLUSTER_MAXIMUM_CONCURRENCY =
+ new LongConfigParam(ConnectionProperties.COLUMNAR_CLUSTER_MAXIMUM_CONCURRENCY,
+ -1L,
+ Long.MAX_VALUE,
+ -1L,
+ true);
+
+ /**
+ * The size of the time window required to calculate QPS for columnar storage read-only instances
+ */
+ public static final LongConfigParam COLUMNAR_QPS_WINDOW_PERIOD =
+ new LongConfigParam(ConnectionProperties.COLUMNAR_QPS_WINDOW_PERIOD,
+ 1000L,
+ Long.MAX_VALUE,
+ 5000L,
+ true);
+
+ public static final LongConfigParam MPP_QUERY_RESULT_MAX_WAIT_IN_MILLIS =
+ new LongConfigParam(ConnectionProperties.MPP_QUERY_RESULT_MAX_WAIT_IN_MILLIS,
+ 1L,
+ Long.MAX_VALUE,
+ 10L,
+ true);
+ /**
+ * 等待列存同步的超时时间
+ */
+ public static final LongConfigParam WAIT_FOR_COLUMNAR_COMMIT_MS = new LongConfigParam(
+ ConnectionProperties.WAIT_FOR_COLUMNAR_COMMIT_MS,
+ 0L,
+ Long.MAX_VALUE,
+ 60000L,
+ true
+ );
+
+ public static final IntConfigParam CN_DIV_PRECISION_INCREMENT = new IntConfigParam(
+ ConnectionProperties.CN_DIV_PRECISION_INCREMENT,
+ 0,
+ 30,
+ 4,
+ true
+ );
+
+ public static final BooleanConfigParam ENABLE_DRDS_TYPE_SYSTEM = new BooleanConfigParam(
+ ConnectionProperties.ENABLE_DRDS_TYPE_SYSTEM,
+ false,
+ true);
+
}
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/properties/ConnectionProperties.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/properties/ConnectionProperties.java
index 5c89c64dd..9e056e8ea 100644
--- a/polardbx-common/src/main/java/com/alibaba/polardbx/common/properties/ConnectionProperties.java
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/properties/ConnectionProperties.java
@@ -22,7 +22,15 @@
* @author Dreamond
*/
public class ConnectionProperties {
+ /**
+ * Generate columnar snapshots automatically.
+ */
+ public static final String ENABLE_AUTO_GEN_COLUMNAR_SNAPSHOT = "ENABLE_AUTO_GEN_COLUMNAR_SNAPSHOT";
+ public static final String AUTO_GEN_COLUMNAR_SNAPSHOT_PARALLELISM = "AUTO_GEN_COLUMNAR_SNAPSHOT_PARALLELISM";
+ /**
+ * CoronaDB PlanCache
+ */
public static final String PLAN_CACHE = "PLAN_CACHE";
public static final String PHY_SQL_TEMPLATE_CACHE = "PHY_SQL_TEMPLATE_CACHE";
public static final String PREPARE_OPTIMIZE = "PREPARE_OPTIMIZE";
@@ -125,8 +133,34 @@ public class ConnectionProperties {
public static final String FIRST_THEN_CONCURRENT_POLICY = "FIRST_THEN_CONCURRENT_POLICY";
+ /**
+ * 在事务时,DML忽略串行执行策略规则,详情请见ExecUtils.getQueryConcurrencyPolicy
+ */
+ public static final String ENABLE_DML_GROUP_CONCURRENT_IN_TRANSACTION =
+ "ENABLE_DML_GROUP_CONCURRENT_IN_TRANSACTION";
+
+ /**
+ * 指定 DML 执行策略, PUSHDOWN, DETERMINISTIC_PUSHDOWN, LOGICAL
+ */
public static final String DML_EXECUTION_STRATEGY = "DML_EXECUTION_STRATEGY";
+ /**
+ * 是否下推 WHERE 条件中包含目标表子查询的 DELETE/UPDATE 语句
+ */
+ public final static String DML_PUSH_MODIFY_WITH_SUBQUERY_CONDITION_OF_TARGET =
+ "DML_PUSH_MODIFY_WITH_SUBQUERY_CONDITION_OF_TARGET";
+
+ /**
+ * 是否禁止 SET 子句中包含子查询的 UPDATE 语句
+ */
+ public final static String DML_FORBID_UPDATE_WITH_SUBQUERY_IN_SET = "DML_FORBID_UPDATE_WITH_SUBQUERY_IN_SET";
+
+ public final static String DML_FORBID_PUSH_DOWN_UPDATE_WITH_SUBQUERY_IN_SET =
+ "DML_FORBID_PUSH_DOWN_UPDATE_WITH_SUBQUERY_IN_SET";
+
+ /**
+ * 是否下推 INSERT IGNORE / REPLACE / UPSERT
+ */
public static final String DML_PUSH_DUPLICATE_CHECK = "DML_PUSH_DUPLICATE_CHECK";
public static final String DML_SKIP_TRIVIAL_UPDATE = "DML_SKIP_TRIVIAL_UPDATE";
@@ -144,6 +178,22 @@ public class ConnectionProperties {
*/
public static final String DML_USE_RETURNING = "DML_USE_RETURNING";
+ /**
+ * 是否使用 returning 优化包含 order by limit 的 update / delete
+ */
+ public static final String OPTIMIZE_MODIFY_TOP_N_BY_RETURNING = "OPTIMIZE_MODIFY_TOP_N_BY_RETURNING";
+
+ /**
+ * 是否使用 returning 优化需要逻辑执行的 DELETE
+ */
+ public static final String OPTIMIZE_DELETE_BY_RETURNING = "OPTIMIZE_DELETE_BY_RETURNING";
+
+ /**
+ * 是否为局部 UK 使用全表扫描检查冲突的插入值
+ */
+ public static final String DML_GET_DUP_FOR_LOCAL_UK_WITH_FULL_TABLE_SCAN =
+ "DML_GET_DUP_FOR_LOCAL_UK_WITH_FULL_TABLE_SCAN";
+
/**
* 是否使用 GSI 检查冲突的插入值
*/
@@ -212,6 +262,16 @@ public class ConnectionProperties {
*/
public static final String FORBID_DDL_WITH_CCI = "FORBID_DDL_WITH_CCI";
+ /**
+ * 是否在执行repartition的时候重建CCI
+ */
+ public static final String REBUILD_CCI_WHEN_REPARTITION = "REBUILD_CCI_WHEN_REPARTITION";
+
+ /**
+ * 是否允许在 CCI 上执行 DROP/TRUNCATE PARTITION 删除/清空数据,会造成主表和分区表数据不一致
+ */
+ public static final String ENABLE_DROP_TRUNCATE_CCI_PARTITION = "ENABLE_DROP_TRUNCATE_CCI_PARTITION";
+
/**
* 在 RelocateWriter 中是否通过 PartitionField 判断拆分键是否变化
*/
@@ -593,6 +653,11 @@ public class ConnectionProperties {
*/
public static final String COLUMNAR_TSO_UPDATE_INTERVAL = "COLUMNAR_TSO_UPDATE_INTERVAL";
+ /**
+ * 主动为主实例增加一个 tso 加载延迟,通过读一个更早的 tso 来规避加载增量数据导致的延迟,单位为毫秒
+ */
+ public static final String COLUMNAR_TSO_UPDATE_DELAY = "COLUMNAR_TSO_UPDATE_DELAY";
+
/**
* 默认事务清理开始时间(在该时间段内随机)
*/
@@ -649,6 +714,9 @@ public class ConnectionProperties {
*/
public static final String INSERT_SELECT_SELF_BY_PARALLEL = "INSERT_SELECT_SELF_BY_PARALLEL";
+ public static final String ENABLE_INSERT_SELECT_WITH_FLASHBACK_PUSH_DOWN =
+ "ENABLE_INSERT_SELECT_WITH_FLASHBACK_PUSH_DOWN";
+
/**
* 是否允许 Insert 列重复
*/
@@ -756,6 +824,8 @@ public class ConnectionProperties {
public static final String SAMPLE_PERCENTAGE = "SAMPLE_PERCENTAGE";
+ public static final String DN_HINT = "DN_HINT";
+
/**
* backfill sample_percentage
*/
@@ -861,6 +931,10 @@ public class ConnectionProperties {
public static final String ENABLE_LV_SUBQUERY_UNWRAP = "ENABLE_LV_SUBQUERY_UNWRAP";
+ public static final String ENABLE_AUTO_FORCE_INDEX = "ENABLE_AUTO_FORCE_INDEX";
+
+ public static final String ENABLE_DELETE_FORCE_CC_INDEX = "ENABLE_DELETE_FORCE_CC_INDEX";
+
public static final String EXPLAIN_PRUNING_DETAIL = "EXPLAIN_PRUNING_DETAIL";
public static final String ENABLE_FILTER_REORDER = "ENABLE_FILTER_REORDER";
@@ -880,7 +954,9 @@ public class ConnectionProperties {
public static final String ENABLE_SORT_AGG = "ENABLE_SORT_AGG";
- public static final String PARTIAL_AGG_ONLY = "PARTIAL_AGG_ONLY";
+ public static final String PREFER_PUSH_AGG = "PREFER_PUSH_AGG";
+
+ public static final String PREFER_PARTIAL_AGG = "PREFER_PARTIAL_AGG";
public static final String PARTIAL_AGG_SHARD = "PARTIAL_AGG_SHARD";
@@ -889,6 +965,12 @@ public class ConnectionProperties {
*/
public static final String ENABLE_PARTIAL_AGG = "ENABLE_PARTIAL_AGG";
+ public static final String ENABLE_TOPN = "ENABLE_TOPN";
+
+ public static final String ENABLE_LIMIT = "ENABLE_LIMIT";
+
+ public static final String ENABLE_PARTIAL_LIMIT = "ENABLE_PARTIAL_LIMIT";
+
public static final String PARTIAL_AGG_SELECTIVITY_THRESHOLD = "PARTIAL_AGG_SELECTIVITY_THRESHOLD";
public static final String PARTIAL_AGG_BUCKET_THRESHOLD = "PARTIAL_AGG_BUCKET_THRESHOLD";
@@ -989,6 +1071,11 @@ public class ConnectionProperties {
*/
public static final String PUSHDOWN_HINT_ON_BROADCAST = "PUSHDOWN_HINT_ON_BROADCAST";
+ /**
+ * copy modify with HINT NODE(0) TO SINGLE GROUP
+ */
+ public static final String COPY_MODIFY_NODE0_TO_SINGLE = "COPY_MODIFY_NODE0_TO_SINGLE";
+
/**
* allow Global Secondary Index DDL or DML on MySQL 5.6
*/
@@ -1091,7 +1178,13 @@ public class ConnectionProperties {
/**
* max sample size of backfill physical table
*/
- public static final String BACKFILL_MAX_SAMPLE_SIZE = "BACKFILL_MAX_SAMPLE_SIZE";
+ public static final String BACKFILL_MAX_SAMPLE_ROWS = "BACKFILL_MAX_SAMPLE_ROWS";
+
+ public static final String BACKFILL_MAX_SAMPLE_ROWS_FOR_PK_RANGE = "BACKFILL_MAX_SAMPLE_ROWS_FOR_PK_RANGE";
+
+ public static final String BACKFILL_MAX_PK_RANGE_SIZE = "BACKFILL_MAX_PK_RANGE_SIZE";
+
+ public static final String BACKFILL_MAX_TASK_PK_RANGE_SIZE = "BACKFILL_MAX_TASK_PK_RANGE_SIZE";
public static final String BACKFILL_USE_RETURNING = "BACKFILL_USE_RETURNING";
@@ -1119,9 +1212,20 @@ public class ConnectionProperties {
public static final String GSI_BACKFILL_USE_FASTCHECKER = "GSI_BACKFILL_USE_FASTCHECKER";
- public static final String CHECK_GLOBAL_INDEX_USE_FASTCHECKER = "CHECK_GLOBAL_INDEX_USE_FASTCHECKER";
+ public static final String GSI_BACKFILL_OVERRIDE_DDL_PARAMS = "GSI_BACKFILL_OVERRIDE_DDL_PARAMS";
+
+ public static final String GSI_BUILD_LOCAL_INDEX_LATER = "GSI_BUILD_LOCAL_INDEX_LATER";
+
+ public static final String GSI_BACKFILL_BY_PK_RANGE = "GSI_BACKFILL_BY_PK_RANGE";
+
+ public static final String GSI_BACKFILL_BY_PARTITION = "GSI_BACKFILL_BY_PARTITION";
+
+ public static final String GSI_JOB_MAX_PARALLELISM = "GSI_JOB_MAX_PARALLELISM";
+
+ public static final String GSI_PK_RANGE_CPU_ACQUIRE = "GSI_PK_RANGE_CPU_ACQUIRE";
+
+ public static final String GSI_PK_RANGE_LOCK_READ = "GSI_PK_RANGE_LOCK_READ";
- public static final String FASTCHECKER_RETRY_TIMES = "FASTCHECKER_RETRY_TIMES";
/**
* fastChecker use thread pool to control parallelism
* each thread pool corresponds to a storage inst node
@@ -1200,6 +1304,11 @@ public class ConnectionProperties {
public static final String SCALE_OUT_DROP_DATABASE_AFTER_SWITCH_DATASOURCE =
"SCALE_OUT_DROP_DATABASE_AFTER_SWITCH_DATASOURCE";
+ public static final String SCALE_OUT_GENERATE_MULTIPLE_TO_GROUP_JOB =
+ "SCALE_OUT_GENERATE_MULTIPLE_TO_GROUP_JOB";
+ /**
+ * retry time when scaleout task fail
+ */
public static final String SCALEOUT_TASK_RETRY_TIME = "SCALEOUT_TASK_RETRY_TIME";
public static final String ALLOW_DROP_DATABASE_IN_SCALEOUT_PHASE = "ALLOW_DROP_DATABASE_IN_SCALEOUT_PHASE";
@@ -1224,6 +1333,11 @@ public class ConnectionProperties {
*/
public static final String ALLOW_DROP_OR_MODIFY_PART_UNIQUE_WITH_GSI = "ALLOW_DROP_OR_MODIFY_PART_UNIQUE_WITH_GSI";
+ public static final String UNIQUE_GSI_WITH_PRIMARY_KEY = "UNIQUE_GSI_WITH_PRIMARY_KEY";
+
+ /**
+ * allow change/modify columns in which is also in GSI.
+ */
public static final String ALLOW_LOOSE_ALTER_COLUMN_WITH_GSI = "ALLOW_LOOSE_ALTER_COLUMN_WITH_GSI";
/**
@@ -1464,6 +1578,10 @@ public class ConnectionProperties {
public static final String ENABLE_SPM_EVOLUTION_BY_TIME = "ENABLE_SPM_EVOLUTION_BY_TIME";
+ public static final String ENABLE_HOT_GSI_EVOLUTION = "ENABLE_HOT_GSI_EVOLUTION";
+
+ public static final String HOT_GSI_EVOLUTION_THRESHOLD = "HOT_GSI_EVOLUTION_THRESHOLD";
+
public static final String ENABLE_SPM_BACKGROUND_TASK = "ENABLE_SPM_BACKGROUND_TASK";
public static final String SPM_MAX_BASELINE_SIZE = "SPM_MAX_BASELINE_SIZE";
@@ -1535,6 +1653,11 @@ public class ConnectionProperties {
*/
public static final String PURE_ASYNC_DDL_MODE = "PURE_ASYNC_DDL_MODE";
+ /**
+ * Label if return job_id on async_ddl_mode when submit ddl
+ */
+ public static final String RETURN_JOB_ID_ON_ASYNC_DDL_MODE = "RETURN_JOB_ID_ON_ASYNC_DDL_MODE";
+
public static final String ENABLE_OPERATE_SUBJOB = "ENABLE_OPERATE_SUBJOB";
public static final String SKIP_VALIDATE_STORAGE_INST_IDLE = "SKIP_VALIDATE_STORAGE_INST_IDLE";
@@ -1674,7 +1797,7 @@ public class ConnectionProperties {
public static final String POLARDBX_PARALLELISM = "POLARDBX_PARALLELISM";
- public static final String POLARDBX_SLAVE_INSTANCE_FIRST = "POLARDBX_SLAVE_INSTANCE_FIRST";
+ public static final String ALLOW_COLUMNAR_BIND_MASTER = "ALLOW_COLUMNAR_BIND_MASTER";
public static final String SEGMENTED = "SEGMENTED";
@@ -1791,11 +1914,16 @@ public class ConnectionProperties {
public static final String MPP_ELAPSED_QUERY_THRESHOLD_MILLS = "MPP_ELAPSED_QUERY_THRESHOLD_MILLS";
+ public static final String ENABLE_MPP_UI = "ENABLE_MPP_UI";
+
public static final String MPP_METRIC_LEVEL = "MPP_METRIC_LEVEL";
public static final String MPP_QUERY_NEED_RESERVE = "MPP_QUERY_NEED_RESERVE";
public static final String ENABLE_MODIFY_SHARDING_COLUMN = "ENABLE_MODIFY_SHARDING_COLUMN";
+
+ public static final String NDV_ALIKE_PRECENTAGE_THRESHOLD = "NDV_ALIKE_PRECENTAGE_THRESHOLD";
+
public static final String ENABLE_MODIFY_LIMIT_OFFSET_NOT_ZERO = "ENABLE_MODIFY_LIMIT_OFFSET_NOT_ZERO";
/**
* Allow multi update/delete cross db
@@ -1814,6 +1942,10 @@ public class ConnectionProperties {
public static final String ENABLE_INDEX_SKYLINE = "ENABLE_INDEX_SKYLINE";
public static final String ENABLE_MERGE_INDEX = "ENABLE_MERGE_INDEX";
public static final String ENABLE_OSS_INDEX_SELECTION = "ENABLE_OSS_INDEX_SELECTION";
+
+ /**
+ * whether to use plan cache for columnar plan
+ */
public static final String ENABLE_COLUMNAR_PLAN_CACHE = "ENABLE_COLUMNAR_PLAN_CACHE";
public static final String ENABLE_COLUMNAR_PULL_UP_PROJECT = "ENABLE_COLUMNAR_PULL_UP_PROJECT";
/**
@@ -1935,13 +2067,16 @@ public class ConnectionProperties {
public static final String WORKLOAD_CPU_THRESHOLD = "WORKLOAD_CPU_THRESHOLD";
public static final String WORKLOAD_MEMORY_THRESHOLD = "WORKLOAD_MEMORY_THRESHOLD";
public static final String WORKLOAD_IO_THRESHOLD = "WORKLOAD_IO_THRESHOLD";
+
public static final String WORKLOAD_OSS_NET_THRESHOLD = "WORKLOAD_OSS_NET_THRESHOLD";
public static final String WORKLOAD_COLUMNAR_ROW_THRESHOLD = "WORKLOAD_COLUMNAR_ROW_THRESHOLD";
public static final String WORKLOAD_TYPE = "WORKLOAD_TYPE";
public static final String ENABLE_OSS_MOCK_COLUMNAR = "ENABLE_OSS_MOCK_COLUMNAR";
+ public static final String ENABLE_COLUMNAR_CORRELATE = "ENABLE_COLUMNAR_CORRELATE";
public static final String ENABLE_COLUMNAR_OPTIMIZER = "ENABLE_COLUMNAR_OPTIMIZER";
+ public static final String ENABLE_COLUMNAR_OPTIMIZER_WITH_COLUMNAR = "ENABLE_COLUMNAR_OPTIMIZER_WITH_COLUMNAR";
public static final String EXECUTOR_MODE = "EXECUTOR_MODE";
public static final String ENABLE_MASTER_MPP = "ENABLE_MASTER_MPP";
public static final String ENABLE_TEMP_TABLE_JOIN = "ENABLE_TEMP_TABLE_JOIN";
@@ -1981,6 +2116,8 @@ public class ConnectionProperties {
public static final String SPILL_OUTPUT_MAX_BUFFER_SIZE = "SPILL_OUTPUT_MAX_BUFFER_SIZE";
public static final String SUPPORT_READ_FOLLOWER_STRATEGY = "SUPPORT_READ_FOLLOWER_STRATEGY";
public static final String ENABLE_BROADCAST_RANDOM_READ = "ENABLE_BROADCAST_RANDOM_READ";
+ public static final String BROADCAST_RANDOM_READ_IN_LOGICALVIEW =
+ "BROADCAST_RANDOM_READ_IN_LOGICALVIEW";
public static final String ENABLE_LOCAL_PARTITION_WISE_JOIN = "ENABLE_LOCAL_PARTITION_WISE_JOIN";
@@ -2043,9 +2180,8 @@ public class ConnectionProperties {
*/
public static final String STATISTICS_DUMP_IGNORE_STRING = "STATISTICS_DUMP_IGNORE_STRING";
/**
- * 是否开启 SELECT INTO OUTFILE 默认关闭
+ * Use range-format to show hash/key partitioned table
*/
- public static final String ENABLE_SELECT_INTO_OUTFILE = "ENABLE_SELECT_INTO_OUTFILE";
public static final String SHOW_HASH_PARTITIONS_BY_RANGE = "SHOW_HASH_PARTITIONS_BY_RANGE";
public static final String SHOW_TABLE_GROUP_NAME = "SHOW_TABLE_GROUP_NAME";
public static final String MAX_PHYSICAL_PARTITION_COUNT = "MAX_PHYSICAL_PARTITION_COUNT";
@@ -2076,10 +2212,7 @@ public class ConnectionProperties {
public static final String BALANCER_MAX_PARTITION_SIZE = "BALANCER_MAX_PARTITION_SIZE";
public static final String BALANCER_WINDOW = "BALANCER_WINDOW";
- /**
- * switch for partition management
- */
- public static final String ENABLE_PARTITION_MANAGEMENT = "ENABLE_PARTITION_MANAGEMENT";
+ public static final String SHOW_DDL_ENGINE_RESOURCES = "SHOW_DDL_ENGINE_RESOURCES";
/**
* Allow move the single table with locality='balance_single_table=on' during scale-out/scale-in
@@ -2110,6 +2243,7 @@ public class ConnectionProperties {
public static final String ENABLE_OPTIMIZER_ALERT = "ENABLE_OPTIMIZER_ALERT";
public static final String ENABLE_OPTIMIZER_ALERT_LOG = "ENABLE_OPTIMIZER_ALERT_LOG";
public static final String OPTIMIZER_ALERT_LOG_INTERVAL = "OPTIMIZER_ALERT_LOG_INTERVAL";
+
public static final String ALERT_BKA_BASE = "ALERT_BKA_BASE";
public static final String ALERT_TP_BASE = "ALERT_TP_BASE";
@@ -2167,9 +2301,11 @@ public class ConnectionProperties {
public static final String STORAGE_HA_CONNECT_TIMEOUT = "STORAGE_HA_CONNECT_TIMEOUT";
public static final String ENABLE_HA_CHECK_TASK_LOG = "ENABLE_HA_CHECK_TASK_LOG";
- public static final String ENABLE_NDV_USE_COLUMNAR = "ENABLE_NDV_USE_COLUMNAR";
+ public static final String ANALYZE_TEST_UPDATE = "ANALYZE_TEST_UPDATE";
public static final String ENABLE_MPP_NDV_USE_COLUMNAR = "ENABLE_MPP_NDV_USE_COLUMNAR";
+
+ public static final String MPP_NDV_USE_COLUMNAR_LIMIT = "MPP_NDV_USE_COLUMNAR_LIMIT";
/**
* ndv sketch expire time
*/
@@ -2207,6 +2343,10 @@ public class ConnectionProperties {
public static final String SCHEDULER_MAX_WORKER_COUNT = "SCHEDULER_MAX_WORKER_COUNT";
public static final String DEFAULT_LOCAL_PARTITION_SCHEDULE_CRON_EXPR =
"DEFAULT_LOCAL_PARTITION_SCHEDULE_CRON_EXPR";
+
+ public static final String DEFAULT_TTL_SCHEDULE_CRON_EXPR =
+ "DEFAULT_TTL_SCHEDULE_CRON_EXPR";
+
/**
* check target table after alter tablegroup's backfill
*/
@@ -2282,6 +2422,7 @@ public class ConnectionProperties {
public static final String ENABLE_OSS_DELAY_MATERIALIZATION = "ENABLE_OSS_DELAY_MATERIALIZATION";
public static final String ENABLE_OSS_ZERO_COPY = "ENABLE_OSS_ZERO_COPY";
public static final String ENABLE_OSS_COMPATIBLE = "ENABLE_OSS_COMPATIBLE";
+ public static final String OSS_STREAM_BUFFER_SIZE = "OSS_STREAM_BUFFER_SIZE";
public static final String ENABLE_PAIRWISE_SHUFFLE_COMPATIBLE = "ENABLE_PAIRWISE_SHUFFLE_COMPATIBLE";
@@ -2293,6 +2434,9 @@ public class ConnectionProperties {
"ENABLE_OSS_FILE_CONCURRENT_SPLIT_ROUND_ROBIN";
public static final String ENABLE_REUSE_VECTOR = "ENABLE_REUSE_VECTOR";
public static final String ENABLE_DECIMAL_FAST_VEC = "ENABLE_DECIMAL_FAST_VEC";
+ public static final String ENABLE_IN_VEC_AUTO_TYPE = "ENABLE_IN_VEC_AUTO_TYPE";
+ public static final String ENABLE_AND_FAST_VEC = "ENABLE_AND_FAST_VEC";
+ public static final String ENABLE_OR_FAST_VEC = "ENABLE_OR_FAST_VEC";
public static final String ENABLE_UNIQUE_HASH_KEY = "ENABLE_UNIQUE_HASH_KEY";
public static final String ENABLE_PRUNE_EXCHANGE_PARTITION = "ENABLE_PRUNE_EXCHANGE_PARTITION";
public static final String BLOCK_BUILDER_CAPACITY = "BLOCK_BUILDER_CAPACITY";
@@ -2302,7 +2446,13 @@ public class ConnectionProperties {
public static final String OSS_FILE_ORDER = "OSS_FILE_ORDER";
public static final String MAX_SESSION_PREPARED_STMT_COUNT = "MAX_SESSION_PREPARED_STMT_COUNT";
public static final String ALLOW_REPLACE_ARCHIVE_TABLE = "ALLOW_REPLACE_ARCHIVE_TABLE";
+
+ public static final String CHECK_ARCHIVE_PARTITION_READY = "CHECK_ARCHIVE_PARTITION_READY";
+
public static final String ALLOW_CREATE_TABLE_LIKE_FILE_STORE = "ALLOW_CREATE_TABLE_LIKE_FILE_STORE";
+
+ public static final String ALLOW_CREATE_TABLE_LIKE_IGNORE_ARCHIVE_CCI = "ALLOW_CREATE_TABLE_LIKE_IGNORE_ARCHIVE_CCI";
+
/**
* is enable collect partitions heatmap, dynamic, default:true
*/
@@ -2331,6 +2481,9 @@ public class ConnectionProperties {
*/
public static final String ENABLE_EXTREME_PERFORMANCE = "ENABLE_EXTREME_PERFORMANCE";
public static final String ENABLE_CLEAN_FAILED_PLAN = "ENABLE_CLEAN_FAILED_PLAN";
+
+ public static final String ENABLE_LOG_SYSTEM_METRICS = "ENABLE_LOG_SYSTEM_METRICS";
+
/**
* the min size of IN expr that would be pruned
*/
@@ -2481,6 +2634,12 @@ public class ConnectionProperties {
*/
public static final String ROLLBACK_UNKNOWN_PRIMARY_GROUP_XA_TRX = "ROLLBACK_UNKNOWN_PRIMARY_GROUP_XA_TRX";
public static final String PREFETCH_EXECUTE_POLICY = "PREFETCH_EXECUTE_POLICY";
+
+ public static final String ENABLE_RANGE_SCAN = "ENABLE_RANGE_SCAN";
+ public static final String ENABLE_RANGE_SCAN_FOR_DML = "ENABLE_RANGE_SCAN_FOR_DML";
+ public static final String RANGE_SCAN_MODE = "RANGE_SCAN_MODE";
+ public static final String RANGE_SCAN_ADAPTIVE_POLICY = "RANGE_SCAN_ADAPTIVE_POLICY";
+ public static final String RANGE_SCAN_SERIALIZE_LIMIT = "RANGE_SCAN_SERIALIZE_LIMIT";
public static final String MAX_RECURSIVE_TIME = "MAX_RECURSIVE_COUNT";
public static final String MAX_RECURSIVE_CTE_MEM_BYTES = "MAX_RECURSIVE_CTE_MEM_BYTES";
public static final String ENABLE_REPLICA = "ENABLE_REPLICA";
@@ -2547,6 +2706,10 @@ public class ConnectionProperties {
* The count of maximum groups in a scan work.
*/
public static final String COLUMNAR_WORK_UNIT = "COLUMNAR_WORK_UNIT";
+ /**
+ * To enable the multi-version partition for columnar index partition pruning.
+ */
+ public static final String ENABLE_COLUMNAR_MULTI_VERSION_PARTITION = "ENABLE_COLUMNAR_MULTI_VERSION_PARTITION";
/**
* The policy of table scan: IO_PRIORITY, FILTER_PRIORITY, IO_ON_DEMAND.
*/
@@ -2588,6 +2751,7 @@ public class ConnectionProperties {
public static final String ENABLE_DRIVER_OBJECT_POOL = "ENABLE_DRIVER_OBJECT_POOL";
public static final String ENABLE_COLUMNAR_SCAN_SELECTION = "ENABLE_COLUMNAR_SCAN_SELECTION";
public static final String BLOCK_CACHE_MEMORY_SIZE_FACTOR = "BLOCK_CACHE_MEMORY_SIZE_FACTOR";
+ public static final String PREHEATED_CACHE_MAX_ENTRIES = "PREHEATED_CACHE_MAX_ENTRIES";
public static final String ENABLE_BLOCK_BUILDER_BATCH_WRITING = "ENABLE_BLOCK_BUILDER_BATCH_WRITING";
public static final String ENABLE_SCAN_RANDOM_SHUFFLE = "ENABLE_SCAN_RANDOM_SHUFFLE";
@@ -2620,9 +2784,19 @@ public class ConnectionProperties {
public static final String PHYSICAL_BACKFILL_IMPORT_TABLESPACE_BY_LEADER =
"PHYSICAL_BACKFILL_IMPORT_TABLESPACE_BY_LEADER";
+ public static final String PHYSICAL_BACKFILL_IMPORT_TABLESPACE_IO_ADVISE =
+ "PHYSICAL_BACKFILL_IMPORT_TABLESPACE_IO_ADVISE";
+ public static final String PHYSICAL_BACKFILL_PIPELINE_SIZE = "PHYSICAL_BACKFILL_PIPELINE_SIZE";
+
+ public static final String DISCARD_TABLESPACE_USE_GROUP_CONCURRENT_BLOCK =
+ "DISCARD_TABLESPACE_USE_GROUP_CONCURRENT_BLOCK";
+
public static final String PHYSICAL_BACKFILL_SPEED_TEST =
"PHYSICAL_BACKFILL_SPEED_TEST";
+ public static final String ANALYZE_TABLE_AFTER_IMPORT_TABLESPACE =
+ "ANALYZE_TABLE_AFTER_IMPORT_TABLESPACE";
+
public static final String REBALANCE_MAINTENANCE_ENABLE = "REBALANCE_MAINTENANCE_ENABLE";
public static final String REBALANCE_MAINTENANCE_TIME_START = "REBALANCE_MAINTENANCE_TIME_START";
@@ -2631,6 +2805,16 @@ public class ConnectionProperties {
public static final String CANCEL_REBALANCE_JOB_DUE_MAINTENANCE = "CANCEL_REBALANCE_JOB_DUE_MAINTENANCE";
public static final String ENABLE_DEADLOCK_DETECTION_80 = "ENABLE_DEADLOCK_DETECTION_80";
+
+ public static final String DEADLOCK_DETECTION_80_FETCH_TRX_ROWS = "DEADLOCK_DETECTION_80_FETCH_TRX_ROWS";
+
+ public static final String DEADLOCK_DETECTION_DATA_LOCK_WAITS_THRESHOLD =
+ "DEADLOCK_DETECTION_DATA_LOCK_WAITS_THRESHOLD";
+
+ public static final String MAX_KEEP_DEADLOCK_LOGS = "MAX_KEEP_DEADLOCK_LOGS";
+
+ public static final String DEADLOCK_DETECTION_SKIP_ROUND = "DEADLOCK_DETECTION_SKIP_ROUND";
+
public static final String MOCK_COLUMNAR_INDEX = "MOCK_COLUMNAR_INDEX";
public static final String MCI_FORMAT = "MCI_FORMAT";
public static final String ENABLE_LOGICAL_TABLE_META = "ENABLE_LOGICAL_TABLE_META";
@@ -2709,26 +2893,332 @@ public class ConnectionProperties {
public static final String ENABLE_1PC_OPT = "ENABLE_1PC_OPT";
- // In milliseconds.
- public static final String MIN_SNAPSHOT_KEEP_TIME = "MIN_SNAPSHOT_KEEP_TIME";
-
public static final String FORCE_CCI_VISIBLE = "FORCE_CCI_VISIBLE";
- public static final String ENABLE_ORC_DELETED_SCAN = "ENABLE_ORC_DELETED_SCAN";
+ public static final String ENABLE_OSS_DELETED_SCAN = "ENABLE_OSS_DELETED_SCAN";
public static final String ENABLE_ORC_RAW_TYPE_BLOCK = "ENABLE_ORC_RAW_TYPE_BLOCK";
- public static final String FORCE_READ_ORC_FILE = "FORCE_READ_ORC_FILE";
-
public static final String READ_CSV_ONLY = "READ_CSV_ONLY";
public static final String READ_ORC_ONLY = "READ_ORC_ONLY";
- public static final String ENABLE_FAST_CCI_CHECKER = "ENABLE_FAST_CCI_CHECKER";
+ public static final String READ_SPECIFIED_COLUMNAR_FILES = "READ_SPECIFIED_COLUMNAR_FILES";
+
+ public static final String CCI_INCREMENTAL_CHECK = "CCI_INCREMENTAL_CHECK";
+
+ public static final String ENABLE_CCI_FAST_CHECKER = "ENABLE_CCI_FAST_CHECKER";
public static final String ENABLE_FAST_PARSE_ORC_RAW_TYPE = "ENABLE_FAST_PARSE_ORC_RAW_TYPE";
+ public static final String ENABLE_ACCURATE_REL_TYPE_TO_DATA_TYPE = "ENABLE_ACCURATE_REL_TYPE_TO_DATA_TYPE";
+
+ public static final String CHECK_CCI_TASK_CHECKPOINT_LIMIT = "CHECK_CCI_TASK_CHECKPOINT_LIMIT";
+
+ public static final String SKIP_CHECK_CCI_SCHEDULE_JOB = "SKIP_CHECK_CCI_SCHEDULE_JOB";
+
public static final String FORBID_AUTO_COMMIT_TRX = "FORBID_AUTO_COMMIT_TRX";
public static final String FORCE_2PC_DURING_CCI_CHECK = "FORCE_2PC_DURING_CCI_CHECK";
+
+ public static final String ENABLE_ACCURATE_INFO_SCHEMA_TABLES = "ENABLE_ACCURATE_INFO_SCHEMA_TABLES";
+ public static final String ENABLE_FLOATING_TYPE_PRECISION = "ENABLE_FLOATING_TYPE_PRECISION";
+
+ public static final String ENABLE_INFO_SCHEMA_TABLES_STAT_COLLECTION = "ENABLE_INFO_SCHEMA_TABLES_STAT_COLLECTION";
+
+ /**
+ * Enable sync point function in CN.
+ */
+ public static final String ENABLE_SYNC_POINT = "ENABLE_SYNC_POINT";
+
+ /**
+ * Mark this trx as sync point trx, for inner usage.
+ */
+ public static final String MARK_SYNC_POINT = "MARK_SYNC_POINT";
+
+ public static final String SYNC_POINT_TASK_INTERVAL = "SYNC_POINT_TASK_INTERVAL";
+
+ public static final String DISABLE_LEGACY_VARIABLE = "DISABLE_LEGACY_VARIABLE";
+
+ public static final String SHOW_COLUMNAR_STATUS_USE_SUB_QUERY = "SHOW_COLUMNAR_STATUS_USE_SUB_QUERY";
+
+ public static final String ENABLE_SHARE_READVIEW_IN_RC = "ENABLE_SHARE_READVIEW_IN_RC";
+
+ /**
+ * ================ Param keys for ttl job begin ================
+ */
+
+ /**
+ * ===========================
+ * The following Config Params for polardbx-inst-level
+ * ===========================
+ */
+
+ /**
+ * The global worker count of select task of all ttl-jobs, default is 0, auto decided by dn count
+ */
+ public static final String TTL_GLOBAL_SELECT_WORKER_COUNT = "TTL_GLOBAL_SELECT_WORKER_COUNT";
+
+ /**
+ * The global worker count of delete task of all ttl-jobs, default is 0, auto decided by dn count
+ */
+ public static final String TTL_GLOBAL_DELETE_WORKER_COUNT = "TTL_GLOBAL_DELETE_WORKER_COUNT";
+
+ /**
+ * The max data length of each one ttl tmp table
+ */
+ public static final String TTL_TMP_TBL_MAX_DATA_LENGTH = "TTL_TMP_TBL_MAX_DATA_LENGTH";
+
+ /**
+ * The max percent of (data_free * 100 / data_length) of ttl-table to perform optimize-table operation,
+ * the default value if 60% , unit: %
+ */
+ public static final String TTL_TBL_MAX_DATA_FREE_PERCENT = "TTL_TBL_MAX_DATA_FREE_PERCENT";
+
+ /**
+ * The max wait time for interrupting a running ttl intra-task, unit: ms, default is 10s
+ * Unit: ms
+ */
+ public static final String TTL_INTRA_TASK_INTERRUPTION_MAX_WAIT_TIME = "TTL_INTRA_TASK_INTERRUPTION_MAX_WAIT_TIME";
+
+ /**
+ * The wait time of each round for the manager of intra-tasks
+ * Unit: ms
+ */
+ public static final String TTL_INTRA_TASK_MONITOR_EACH_ROUTE_WAIT_TIME =
+ "TTL_INTRA_TASK_MONITOR_EACH_ROUTE_WAIT_TIME";
+
+ /**
+ * The max wait time for waiting a ddl-job from pause to running, unit: ms, default value is 30s
+ */
+ public static final String TTL_WAIT_TIME_OF_DDL_JOB_FROM_PAUSED_TO_RUNNING =
+ "TTL_WAIT_TIME_OF_DDL_JOB_FROM_PAUSED_TO_RUNNING";
+
+ /**
+ * The global switch that label if using auto-optimize table in ttl job
+ */
+ public static final String TTL_ENABLE_AUTO_OPTIMIZE_TABLE_IN_TTL_JOB = "TTL_ENABLE_AUTO_OPTIMIZE_TABLE_IN_TTL_JOB";
+
+ /**
+ * Label if auto perform the optimize-table operation for the ttl-table after archiving
+ */
+ public static final String TTL_ENABLE_AUTO_EXEC_OPTIMIZE_TABLE_AFTER_ARCHIVING =
+ "TTL_ENABLE_AUTO_EXEC_OPTIMIZE_TABLE_AFTER_ARCHIVING";
+
+ /**
+ * The max parallelism for the scheduled job of all ttl tables
+ */
+ public static final String TTL_SCHEDULED_JOB_MAX_PARALLELISM = "TTL_SCHEDULED_JOB_MAX_PARALLELISM";
+
+ /**
+ * A local debug option, use create gsi sql instead of cci sql for create
+ * columnar arc table of ttl table, just for debug, session level
+ */
+ public static final String TTL_DEBUG_USE_GSI_FOR_COLUMNAR_ARC_TBL = "TTL_DEBUG_USE_GSI_FOR_COLUMNAR_ARC_TBL";
+
+ /**
+ * A local debug option of ttl20, specify the skip ddl tasks of cci creation of ttl tbl,
+ * such as : SKIP_DDL_TASKS="WaitColumnarTableCreationTask"
+ */
+ public static final String TTL_DEBUG_CCI_SKIP_DDL_TASKS = "TTL_DEBUG_CCI_SKIP_DDL_TASKS";
+
+ /**
+ * The default batch size of dml of ttl-job
+ */
+ public static final String TTL_JOB_DEFAULT_BATCH_SIZE = "TTL_JOB_DEFAULT_BATCH_SIZE";
+
+ /**
+ * The interval count for computing minCleanupBound base on lowerBound(normalized minVal of ttl_col),
+ * that means the delta = ttlMinCleanupBoundIntervalCount * ttlUnit, is the delta interval between
+ * minCleanupBound and the lowerBound, default is 1
+ */
+ public static final String TTL_CLEANUP_BOUND_INTERVAL_COUNT = "TTL_CLEANUP_BOUND_INTERVAL_COUNT";
+
+ /**
+ * Stop ttl-job scheduling for all ttl tables, used for handling critical situation
+ */
+ public static final String TTL_STOP_ALL_JOB_SCHEDULING = "TTL_STOP_ALL_JOB_SCHEDULING";
+
+ /**
+ * label if use archive trans policy for all dml trans of ttl-job
+ *
+ * usage:
+ * set transaction_policy = archive;
+ * begin;
+ * ...
+ * delete from ttl_tbl where ...
+ * commit;
+ *
+ *
+ */
+ public static final String TTL_USE_ARCHIVE_TRANS_POLICY = "TTL_USE_ARCHIVE_TRANS_POLICY";
+
+ /**
+ * The default merge_union_size for the select sql of fetch ttl-col lower bound
+ */
+ public static final String TTL_SELECT_MERGE_UNION_SIZE = "TTL_SELECT_MERGE_UNION_SIZE";
+
+ /**
+ * The label if use merge_concurrent for the select sql of fetch ttl-col lower bound
+ */
+ public static final String TTL_SELECT_MERGE_CONCURRENT = "TTL_SELECT_MERGE_CONCURRENT";
+
+ /**
+ * The query hint for the select stmt of fetch ttl-col lower bound,
+ * which use to control the concurrent policy
+ */
+ public static final String TTL_SELECT_STMT_HINT = "TTL_SELECT_STMT_HINT";
+
+ /**
+ * The query hint for delete stmt of deleting expired data
+ */
+ public static final String TTL_DELETE_STMT_HINT = "TTL_DELETE_STMT_HINT";
+
+ /**
+ * The query hint for insert-select stmt of preparing expired data
+ */
+ public static final String TTL_INSERT_STMT_HINT = "TTL_INSERT_STMT_HINT";
+
+ /**
+ * The query hint for optimize table stmt of ttl-table
+ */
+ public static final String TTL_OPTIMIZE_TABLE_STMT_HINT = "TTL_OPTIMIZE_TABLE_STMT_HINT";
+
+ /**
+ * The query hint for alter table add parts stmt of cci of ttl-table or arctmp of ttl-table
+ */
+ public static final String TTL_ALTER_ADD_PART_STMT_HINT = "TTL_ALTER_ADD_PART_STMT_HINT";
+
+ /**
+ * The default group_parallelism of conn of select stmt, 0 means use the default val of inst_config
+ */
+ public static final String TTL_GROUP_PARALLELISM_ON_DQL_CONN = "TTL_GROUP_PARALLELISM_ON_DQL_CONN";
+
+ /**
+ * The default group_parallelism of conn of delete/insert stmt,0 means use the default val of inst_config
+ */
+ public static final String TTL_GROUP_PARALLELISM_ON_DML_CONN = "TTL_GROUP_PARALLELISM_ON_DML_CONN";
+
+ /**
+ * Label if auto add a maxvalue into the range parts of cci of art-tbl
+ */
+ public static final String TTL_ADD_MAXVAL_PART_ON_CCI_CREATING = "TTL_ADD_MAXVAL_PART_ON_CCI_CREATING";
+
+ /**
+ * The max periods of try waiting to acquire the rate permits, unit: ms
+ */
+ public static final String TTL_MAX_WAIT_ACQUIRE_RATE_PERMITS_PERIODS = "TTL_MAX_WAIT_ACQUIRE_RATE_PERMITS_PERIODS";
+
+ /**
+ * The default rowsSpeed limit for each dn, unit: rows/sec
+ */
+ public static final String TTL_CLEANUP_ROWS_SPEED_LIMIT_EACH_DN = "TTL_CLEANUP_ROWS_SPEED_LIMIT_EACH_DN";
+
+ /**
+ * Label if need limit the cleanup rows speed for each dn
+ */
+ public static final String TTL_ENABLE_CLEANUP_ROWS_SPEED_LIMIT = "TTL_ENABLE_CLEANUP_ROWS_SPEED_LIMIT";
+
+ /**
+ * Label if ignore maintain window in ttl ddl job
+ */
+ public static final String TTL_IGNORE_MAINTAIN_WINDOW_IN_DDL_JOB = "TTL_IGNORE_MAINTAIN_WINDOW_IN_DDL_JOB";
+
+ /**
+ * The ratio of global-worker / rw-dn-count, default is 2
+ */
+ public static final String TTL_GLOBAL_WORKER_DN_RATIO = "TTL_GLOBAL_WORKER_DN_RATIO";
+
+ /**
+ * The default allocate part count for pre building of futrue of arc cci
+ */
+ public static final String TTL_DEFAULT_ARC_PRE_ALLOCATE_COUNT = "TTL_DEFAULT_ARC_PRE_ALLOCATE_COUNT";
+
+ /**
+ * The default allocate part count for post building of past of arc cci
+ */
+ public static final String TTL_DEFAULT_ARC_POST_ALLOCATE_COUNT = "TTL_DEFAULT_ARC_POST_ALLOCATE_COUNT";
+
+ /**
+ * Label if enable auto add partitoins for arc cci
+ */
+ public static final String TTL_ENABLE_AUTO_ADD_PARTS_FOR_ARC_CCI = "TTL_ENABLE_AUTO_ADD_PARTS_FOR_ARC_CCI";
+
+ /**
+ *
+ * ===========================
+ * The following Config Params for polardbx-session-level
+ * ===========================
+ */
+
+ /**
+ * The default charset of trans conn of ttl-job when exec sql
+ */
+ public static final String TTL_DEFAULT_CHARSET_ON_CONN = "TTL_DEFAULT_CHARSET_ON_CONN";
+
+ /**
+ * The default sql mode of trans conn of ttl-job when exec sql
+ */
+ public static final String TTL_DEFAULT_SQL_MODE_ON_CONN = "TTL_DEFAULT_SQL_MODE_ON_CONN";
+
+ /**
+ * The parallelism of alter table ttl_tbl optimize partitions xxx
+ */
+ public static final String TTL_OPTIMIZE_TABLE_PARALLELISM = "TTL_OPTIMIZE_TABLE_PARALLELISM";
+
+ /**
+ * The current datetime value of debug, using for testcases
+ */
+ public static final String TTL_DEBUG_CURRENT_DATETIME = "TTL_DEBUG_CURRENT_DATETIME";
+
+ /**
+ * label of forbid drop ttl-defined table with archive table cci
+ */
+ public static final String TTL_FORBID_DROP_TTL_TBL_WITH_ARC_CCI = "TTL_FORBID_DROP_TTL_TBL_WITH_ARC_CCI";
+
+ /**
+ *
+ * ===========================
+ * The following Config Params for polardbx-stmt-level
+ * ===========================
+ */
+
+ /**
+ * Label if allowed force drop the cci of the archive table
+ */
+ public static final String TTL_FORCE_DROP_ARCHIVE_CCI = "TTL_FORCE_DROP_ARCHIVE_CCI";
+
+ /**
+ * Label if allowed force drop the view of the archive table view of cci
+ */
+ public static final String TTL_FORCE_DROP_ARCHIVE_CCI_VIEW = "TTL_FORCE_DROP_ARCHIVE_CCI_VIEW";
+
+ /**
+ * ================ Param keys for ttl job end ================
+ */
+
+ public static final String ENABLE_PARAM_TYPE_CHANGE = "ENABLE_PARAM_TYPE_CHANGE";
+
+ public static final String COLUMNAR_CLUSTER_MAXIMUM_QPS = "COLUMNAR_CLUSTER_MAXIMUM_QPS";
+
+ public static final String COLUMNAR_CLUSTER_MAXIMUM_CONCURRENCY = "COLUMNAR_CLUSTER_MAXIMUM_CONCURRENCY";
+
+ public static final String COLUMNAR_QPS_WINDOW_PERIOD = "COLUMNAR_QPS_WINDOW_PERIOD";
+
+ /**
+ * All write trx will start a standard 2PC TSO transaction, even in auto-commit mode.
+ */
+ public static final String ENABLE_EXTERNAL_CONSISTENCY_FOR_WRITE_TRX = "ENABLE_EXTERNAL_CONSISTENCY_FOR_WRITE_TRX";
+
+ public static final String CCI_INCREMENTAL_CHECK_PARALLELISM = "CCI_INCREMENTAL_CHECK_PARALLELISM";
+ public static final String CCI_INCREMENTAL_CHECK_BATCH_SIZE = "CCI_INCREMENTAL_CHECK_BATCH_SIZE";
+ public static final String ENABLE_COLUMNAR_DEBUG = "ENABLE_COLUMNAR_DEBUG";
+
+ public static final String MPP_QUERY_RESULT_MAX_WAIT_IN_MILLIS = "MPP_QUERY_RESULT_MAX_WAIT_IN_MILLIS";
+
+ public static final String WAIT_FOR_COLUMNAR_COMMIT_MS = "WAIT_FOR_COLUMNAR_COMMIT_MS";
+
+ public static final String CN_DIV_PRECISION_INCREMENT = "CN_DIV_PRECISION_INCREMENT";
+
+ public static final String ENABLE_DRDS_TYPE_SYSTEM = "ENABLE_DRDS_TYPE_SYSTEM";
}
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/properties/DynamicConfig.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/properties/DynamicConfig.java
index 2c170fbd7..d7a5544e6 100644
--- a/polardbx-common/src/main/java/com/alibaba/polardbx/common/properties/DynamicConfig.java
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/properties/DynamicConfig.java
@@ -22,8 +22,8 @@
import com.alibaba.polardbx.common.TddlConstants;
import com.alibaba.polardbx.common.constants.IsolationLevel;
import com.alibaba.polardbx.common.statementsummary.StatementSummaryManager;
-import com.alibaba.polardbx.common.utils.version.InstanceVersion;
import com.alibaba.polardbx.common.utils.TStringUtil;
+import com.alibaba.polardbx.common.utils.version.InstanceVersion;
import com.alibaba.polardbx.config.ConfigDataMode;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
@@ -96,6 +96,9 @@ public void loadValue(Logger logger, String key, String value) {
case ConnectionProperties.OPTIMIZER_ALERT_LOG_INTERVAL:
optimizerAlertLogInterval = parseValue(value, Long.class, 600000L);
break;
+ case ConnectionProperties.ENABLE_HOT_GSI_EVOLUTION:
+ enableHotGsiEvolution = parseValue(value, Boolean.class, true);
+ break;
case ConnectionProperties.ENABLE_TP_SLOW_ALERT_THRESHOLD:
tpSlowAlertThreshold = parseValue(value, Integer.class, 10);
break;
@@ -123,6 +126,9 @@ public void loadValue(Logger logger, String key, String value) {
case ConnectionProperties.ENABLE_FOLLOWER_READ:
supportFollowRead = parseValue(value, Boolean.class, false);
break;
+ case ConnectionProperties.ENABLE_SHARE_READVIEW_IN_RC:
+ enableShareReadviewInRc = parseValue(value, Boolean.class, false);
+ break;
case ConnectionProperties.ENABLE_REMOTE_CONSUME_LOG:
enableRemoteConsumeLog = parseValue(value, Boolean.class, false);
break;
@@ -143,6 +149,17 @@ public void loadValue(Logger logger, String key, String value) {
case ConnectionProperties.BLOCK_CACHE_MEMORY_SIZE_FACTOR:
blockCacheMemoryFactor = parseValue(value, Float.class, 0.6f);
break;
+ case ConnectionProperties.CN_DIV_PRECISION_INCREMENT:
+ cnDivPrecisionIncrement = parseValue(value, Integer.class, 4);
+ break;
+
+ case ConnectionProperties.PREHEATED_CACHE_MAX_ENTRIES:
+ preheatedCacheMaxEntries = parseValue(value, Long.class, 4096L);
+ break;
+
+ case ConnectionProperties.MPP_QUERY_RESULT_MAX_WAIT_IN_MILLIS:
+ mppQueryResultMaxWaitInMillis = parseValue(value, Long.class, 10L);
+ break;
case ConnectionProperties.PURGE_HISTORY_MS: {
long tempPurgeHistoryMs = parseValue(value, Long.class, 600 * 1000L);
@@ -180,6 +197,24 @@ public void loadValue(Logger logger, String key, String value) {
case ConnectionProperties.PLAN_CACHE_EXPIRE_TIME:
planCacheExpireTime = parseValue(value, Integer.class, 12 * 3600 * 1000); // 12h
break;
+ case ConnectionProperties.ENABLE_COLUMNAR_PLAN_CACHE:
+ enableColumnarPlanCache = parseValue(value, Boolean.class, true);
+ break;
+ case ConnectionProperties.ENABLE_FLOATING_TYPE_PRECISION:
+ enableFloatingTypePrecision = parseValue(value, Boolean.class, true);
+ break;
+ case ConnectionProperties.DEADLOCK_DETECTION_80_FETCH_TRX_ROWS:
+ deadlockDetection80FetchTrxRows = parseValue(value, Long.class, 100_000L);
+ break;
+ case ConnectionProperties.DEADLOCK_DETECTION_DATA_LOCK_WAITS_THRESHOLD:
+ deadlockDetectionDataLockWaitsThreshold = parseValue(value, Long.class, 50_000L);
+ break;
+ case ConnectionProperties.DEADLOCK_DETECTION_SKIP_ROUND:
+ deadlockDetectionSkipRound = parseValue(value, Long.class, 10L);
+ break;
+ case ConnectionProperties.MAX_KEEP_DEADLOCK_LOGS:
+ maxKeepDeadlockLogs = parseValue(value, Long.class, 100L);
+ break;
case ConnectionProperties.ENABLE_EXTREME_PERFORMANCE:
enableExtremePerformance = parseValue(value, Boolean.class, true);
break;
@@ -291,6 +326,18 @@ public void loadValue(Logger logger, String key, String value) {
case ConnectionProperties.ENABLE_X_PROTO_OPT_FOR_AUTO_SP:
xProtoOptForAutoSp = parseValue(value, Boolean.class, false);
break;
+ case ConnectionProperties.CHECK_CCI_TASK_CHECKPOINT_LIMIT:
+ checkCciCheckpointLimit = parseValue(value, Long.class, 1L);
+ break;
+ case ConnectionProperties.SKIP_CHECK_CCI_SCHEDULE_JOB:
+ skipCheckCciScheduleJob = parseValue(value, Boolean.class, false);
+ break;
+ case ConnectionProperties.ENABLE_AUTO_GEN_COLUMNAR_SNAPSHOT:
+ enableAutoGenColumnarSnapshot = parseValue(value, Boolean.class, false);
+ break;
+ case ConnectionProperties.AUTO_GEN_COLUMNAR_SNAPSHOT_PARALLELISM:
+ autoGenColumnarSnapshotParallelism = parseValue(value, Integer.class, 4);
+ break;
case ConnectionProperties.DATABASE_DEFAULT_SINGLE:
databaseDefaultSingle = parseValue(value, Boolean.class, false);
break;
@@ -349,15 +396,30 @@ public void loadValue(Logger logger, String key, String value) {
case ConnectionProperties.INSTANCE_READ_ONLY:
instanceReadOnly = parseValue(value, Boolean.class, false);
break;
- case ConnectionProperties.MIN_SNAPSHOT_KEEP_TIME:
- minSnapshotKeepTime = parseValue(value, Integer.class, 5 * 60 * 1000);
- break;
- case ConnectionProperties.FORBID_AUTO_COMMIT_TRX:
- forbidAutoCommitTrx = parseValue(value, Boolean.class, false);
- break;
case ConnectionProperties.MAPPING_TO_MYSQL_ERROR_CODE:
errorCodeMapping = initErrorCodeMapping(value);
break;
+ case ConnectionProperties.ENABLE_ACCURATE_INFO_SCHEMA_TABLES:
+ enableAccurateInfoSchemaTables = parseValue(value, Boolean.class, false);
+ break;
+ case ConnectionProperties.ENABLE_SYNC_POINT:
+ enableSyncPoint = parseValue(value, Boolean.class, false);
+ break;
+ case ConnectionProperties.SYNC_POINT_TASK_INTERVAL:
+ syncPointTaskInterval = parseValue(value, Integer.class, 5000);
+ break;
+ case ConnectionProperties.DISABLE_LEGACY_VARIABLE:
+ disableLegacyVariable = parseValue(value, Boolean.class, true);
+ break;
+ case ConnectionProperties.CCI_INCREMENTAL_CHECK_PARALLELISM:
+ cciIncrementalCheckParallelism = parseValue(value, Integer.class, 8);
+ break;
+ case ConnectionProperties.CCI_INCREMENTAL_CHECK_BATCH_SIZE:
+ cciIncrementalCheckBatchSize = parseValue(value, Integer.class, 128);
+ break;
+ case ConnectionProperties.ENABLE_COLUMNAR_DEBUG:
+ enableColumnarDebug = parseValue(value, Boolean.class, false);
+ break;
case ConnectionProperties.PRUNING_TIME_WARNING_THRESHOLD:
pruningTimeWarningThreshold = parseValue(value, Long.class, 500L);
break;
@@ -370,9 +432,15 @@ public void loadValue(Logger logger, String key, String value) {
case ConnectionProperties.ENABLE_MQ_CACHE_COST_BY_THREAD:
enableMQCacheByThread = parseValue(value, Boolean.class, true);
break;
+ case ConnectionProperties.NDV_ALIKE_PRECENTAGE_THRESHOLD:
+ ndvAlikePercentageThreshold = parseValue(value, Long.class, 10L);
+ break;
case ConnectionProperties.ENABLE_USE_KEY_FOR_ALL_LOCAL_INDEX:
enableUseKeyForAllLocalIndex = parseValue(value, Boolean.class, false);
break;
+ case ConnectionProperties.ENABLE_PARAM_TYPE_CHANGE:
+ enableChangeParamTypeByMeta = parseValue(value, Boolean.class, false);
+ break;
case TddlConstants.BLACK_LIST_CONF:
String blockLists = parseValue(value, String.class, "");
List tempBlackList = new ArrayList<>();
@@ -386,7 +454,206 @@ public void loadValue(Logger logger, String key, String value) {
}
blackListConf = tempBlackList;
break;
+ case ConnectionProperties.ALLOW_COLUMNAR_BIND_MASTER:
+ columnarBindMaster = parseValue(value, Boolean.class, false);
+ break;
+ case ConnectionProperties.SHOW_COLUMNAR_STATUS_USE_SUB_QUERY:
+ showColumnarStatusUseSubQuery = parseValue(value, Boolean.class, false);
+ break;
+
+ case ConnectionProperties.OSS_STREAM_BUFFER_SIZE:
+ ossStreamBufferSize = parseValue(value, Integer.class, 8192);
+ break;
+
+ case ConnectionProperties.TTL_GLOBAL_SELECT_WORKER_COUNT: {
+ ttlGlobalSelectWorkerCount = parseValue(value, Integer.class,
+ Integer.valueOf(ConnectionParams.TTL_GLOBAL_SELECT_WORKER_COUNT.getDefault()));
+ }
+ break;
+
+ case ConnectionProperties.TTL_GLOBAL_DELETE_WORKER_COUNT: {
+ ttlGlobalDeleteWorkerCount = parseValue(value, Integer.class,
+ Integer.valueOf(ConnectionParams.TTL_GLOBAL_DELETE_WORKER_COUNT.getDefault()));
+ }
+ break;
+
+ case ConnectionProperties.TTL_TMP_TBL_MAX_DATA_LENGTH: {
+ ttlTmpTableMaxDataLength = parseValue(value, Long.class,
+ Long.valueOf(ConnectionParams.TTL_TMP_TBL_MAX_DATA_LENGTH.getDefault()));
+ }
+ break;
+
+ case ConnectionProperties.TTL_TBL_MAX_DATA_FREE_PERCENT: {
+ ttlTmpTableMaxDataFreePercent = parseValue(value, Integer.class,
+ Integer.valueOf(ConnectionParams.TTL_TBL_MAX_DATA_FREE_PERCENT.getDefault()));
+ }
+ break;
+
+ case ConnectionProperties.TTL_INTRA_TASK_INTERRUPTION_MAX_WAIT_TIME: {
+ ttlIntraTaskInterruptionMaxWaitTime = parseValue(value, Integer.class,
+ Integer.valueOf(ConnectionParams.TTL_INTRA_TASK_INTERRUPTION_MAX_WAIT_TIME.getDefault()));
+ }
+ break;
+
+ case ConnectionProperties.TTL_INTRA_TASK_MONITOR_EACH_ROUTE_WAIT_TIME: {
+ ttlIntraTaskMonitorEachRoundWaitTime = parseValue(value, Integer.class,
+ Integer.valueOf(ConnectionParams.TTL_INTRA_TASK_MONITOR_EACH_ROUTE_WAIT_TIME.getDefault()));
+ }
+ break;
+
+ case ConnectionProperties.TTL_ENABLE_AUTO_OPTIMIZE_TABLE_IN_TTL_JOB: {
+ ttlEnableAutoOptimizeTableInTtlJob = parseValue(value, Boolean.class,
+ Boolean.valueOf(ConnectionParams.TTL_ENABLE_AUTO_OPTIMIZE_TABLE_IN_TTL_JOB.getDefault()));
+ }
+ break;
+
+ case ConnectionProperties.TTL_ENABLE_AUTO_EXEC_OPTIMIZE_TABLE_AFTER_ARCHIVING: {
+ ttlEnableAutoExecOptimizeTableAfterArchiving = parseValue(value, Boolean.class,
+ Boolean.valueOf(ConnectionParams.TTL_ENABLE_AUTO_EXEC_OPTIMIZE_TABLE_AFTER_ARCHIVING.getDefault()));
+ }
+ break;
+
+ case ConnectionProperties.TTL_SCHEDULED_JOB_MAX_PARALLELISM: {
+ ttlScheduledJobMaxParallelism = parseValue(value, Integer.class,
+ Integer.valueOf(ConnectionParams.TTL_SCHEDULED_JOB_MAX_PARALLELISM.getDefault()));
+
+ }
+ break;
+
+ case ConnectionProperties.TTL_JOB_DEFAULT_BATCH_SIZE: {
+ ttlJobDefaultBatchSize = parseValue(value, Integer.class,
+ Integer.valueOf(ConnectionParams.TTL_JOB_DEFAULT_BATCH_SIZE.getDefault()));
+ }
+ break;
+
+ case ConnectionProperties.TTL_CLEANUP_BOUND_INTERVAL_COUNT: {
+ ttlCleanupBoundIntervalCount = parseValue(value, Integer.class,
+ Integer.valueOf(ConnectionParams.TTL_CLEANUP_BOUND_INTERVAL_COUNT.getDefault()));
+ }
+ break;
+
+ case ConnectionProperties.TTL_STOP_ALL_JOB_SCHEDULING: {
+ ttlStopAllJobScheduling = parseValue(value, Boolean.class,
+ Boolean.valueOf(ConnectionParams.TTL_STOP_ALL_JOB_SCHEDULING.getDefault()));
+ }
+ break;
+
+ case ConnectionProperties.TTL_USE_ARCHIVE_TRANS_POLICY: {
+ ttlUseArchiveTransPolicy = parseValue(value, Boolean.class,
+ Boolean.valueOf(ConnectionParams.TTL_USE_ARCHIVE_TRANS_POLICY.getDefault()));
+ }
+ break;
+
+ case ConnectionProperties.TTL_SELECT_MERGE_UNION_SIZE: {
+ ttlSelectMergeUnionSize = parseValue(value, Integer.class,
+ Integer.valueOf(ConnectionParams.TTL_SELECT_MERGE_UNION_SIZE.getDefault()));
+ }
+ break;
+
+ case ConnectionProperties.TTL_SELECT_MERGE_CONCURRENT: {
+ ttlSelectMergeConcurrent = parseValue(value, Boolean.class,
+ Boolean.valueOf(ConnectionParams.TTL_SELECT_MERGE_CONCURRENT.getDefault()));
+ }
+ break;
+ case ConnectionProperties.TTL_SELECT_STMT_HINT: {
+ ttlSelectStmtHint = parseValue(value, String.class,
+ String.valueOf(ConnectionParams.TTL_SELECT_STMT_HINT.getDefault()));
+ }
+ break;
+
+ case ConnectionProperties.TTL_DELETE_STMT_HINT: {
+ ttlDeleteStmtHint = parseValue(value, String.class,
+ String.valueOf(ConnectionParams.TTL_DELETE_STMT_HINT.getDefault()));
+ }
+ break;
+
+ case ConnectionProperties.TTL_INSERT_STMT_HINT: {
+ ttlInsertStmtHint = parseValue(value, String.class,
+ String.valueOf(ConnectionParams.TTL_INSERT_STMT_HINT.getDefault()));
+ }
+ break;
+
+ case ConnectionProperties.TTL_OPTIMIZE_TABLE_STMT_HINT: {
+ ttlOptimizeTableStmtHint = parseValue(value, String.class,
+ String.valueOf(ConnectionParams.TTL_OPTIMIZE_TABLE_STMT_HINT.getDefault()));
+ }
+ break;
+
+ case ConnectionProperties.TTL_ALTER_ADD_PART_STMT_HINT: {
+ ttlAlterTableAddPartsStmtHint = parseValue(value, String.class,
+ String.valueOf(ConnectionParams.TTL_ALTER_ADD_PART_STMT_HINT.getDefault()));
+ }
+ break;
+
+ case ConnectionProperties.TTL_GROUP_PARALLELISM_ON_DQL_CONN: {
+ ttlGroupParallelismOnDqlConn = parseValue(value, Long.class,
+ Long.valueOf(ConnectionParams.TTL_GROUP_PARALLELISM_ON_DQL_CONN.getDefault()));
+ }
+ break;
+
+ case ConnectionProperties.TTL_GROUP_PARALLELISM_ON_DML_CONN: {
+ ttlGroupParallelismOnDmlConn = parseValue(value, Long.class,
+ Long.valueOf(ConnectionParams.TTL_GROUP_PARALLELISM_ON_DML_CONN.getDefault()));
+ }
+ break;
+
+ case ConnectionProperties.TTL_ADD_MAXVAL_PART_ON_CCI_CREATING: {
+ ttlAddMaxValPartOnCciCreating = parseValue(value, Boolean.class,
+ Boolean.valueOf(ConnectionParams.TTL_ADD_MAXVAL_PART_ON_CCI_CREATING.getDefault()));
+ }
+ break;
+
+ case ConnectionProperties.TTL_MAX_WAIT_ACQUIRE_RATE_PERMITS_PERIODS: {
+ ttlMaxWaitAcquireRatePermitsPeriods = parseValue(value, Long.class,
+ Long.valueOf(ConnectionParams.TTL_MAX_WAIT_ACQUIRE_RATE_PERMITS_PERIODS.getDefault()));
+ }
+ break;
+
+ case ConnectionProperties.TTL_ENABLE_CLEANUP_ROWS_SPEED_LIMIT: {
+ ttlEnableCleanupRowsSpeedLimit = parseValue(value, Boolean.class,
+ Boolean.valueOf(ConnectionParams.TTL_ENABLE_CLEANUP_ROWS_SPEED_LIMIT.getDefault()));
+ }
+ break;
+
+ case ConnectionProperties.TTL_CLEANUP_ROWS_SPEED_LIMIT_EACH_DN: {
+ ttlCleanupRowsSpeedLimitEachDn = parseValue(value, Long.class,
+ Long.valueOf(ConnectionParams.TTL_CLEANUP_ROWS_SPEED_LIMIT_EACH_DN.getDefault()));
+ }
+ break;
+
+ case ConnectionProperties.TTL_IGNORE_MAINTAIN_WINDOW_IN_DDL_JOB: {
+ ttlIgnoreMaintainWindowInDdlJob = parseValue(value, Boolean.class,
+ Boolean.valueOf(ConnectionParams.TTL_IGNORE_MAINTAIN_WINDOW_IN_DDL_JOB.getDefault()));
+ }
+ break;
+
+ case ConnectionProperties.TTL_GLOBAL_WORKER_DN_RATIO: {
+ ttlGlobalWorkerDnRatio = parseValue(value, Integer.class,
+ Integer.valueOf(ConnectionParams.TTL_GLOBAL_WORKER_DN_RATIO.getDefault()));
+ }
+ break;
+
+ case ConnectionProperties.TTL_DEFAULT_ARC_PRE_ALLOCATE_COUNT: {
+ ttlDefaultArcPreAllocateCount = parseValue(value, Integer.class,
+ Integer.valueOf(ConnectionParams.TTL_DEFAULT_ARC_PRE_ALLOCATE_COUNT.getDefault()));
+ }
+ break;
+
+ case ConnectionProperties.TTL_DEFAULT_ARC_POST_ALLOCATE_COUNT: {
+ ttlDefaultArcPostAllocateCount = parseValue(value, Integer.class,
+ Integer.valueOf(ConnectionParams.TTL_DEFAULT_ARC_POST_ALLOCATE_COUNT.getDefault()));
+ }
+ break;
+
+ case ConnectionProperties.TTL_ENABLE_AUTO_ADD_PARTS_FOR_ARC_CCI: {
+ ttlEnableAutoAddPartsForArcCci = parseValue(value, Boolean.class,
+ Boolean.valueOf(ConnectionParams.TTL_ENABLE_AUTO_ADD_PARTS_FOR_ARC_CCI.getDefault()));
+ }
+ break;
+
+ case ConnectionProperties.WAIT_FOR_COLUMNAR_COMMIT_MS:
+ waitForColumnarCommitMS = parseValue(value, Long.class, 60000L);
default:
FileConfig.getInstance().loadValue(logger, key, value);
break;
@@ -403,7 +670,7 @@ public long getGeneralDynamicSpeedLimitation() {
}
private static final long xprotoMaxDnConcurrentDefault =
- parseValue(ConnectionParams.XPROTO_MAX_DN_CONCURRENT.getDefault(), Long.class, 500L);
+ parseValue(ConnectionParams.XPROTO_MAX_DN_CONCURRENT.getDefault(), Long.class, 2000L);
private volatile long xprotoMaxDnConcurrent = xprotoMaxDnConcurrentDefault;
public long getXprotoMaxDnConcurrent() {
@@ -411,7 +678,7 @@ public long getXprotoMaxDnConcurrent() {
}
private static final long xprotoMaxDnWaitConnectionDefault =
- parseValue(ConnectionParams.XPROTO_MAX_DN_WAIT_CONNECTION.getDefault(), Long.class, 100L);
+ parseValue(ConnectionParams.XPROTO_MAX_DN_WAIT_CONNECTION.getDefault(), Long.class, 2000L);
private volatile long xprotoMaxDnWaitConnection = xprotoMaxDnWaitConnectionDefault;
public long getXprotoMaxDnWaitConnection() {
@@ -472,6 +739,30 @@ public int getXprotoTcpAging() {
parseValue(ConnectionParams.BLOCK_CACHE_MEMORY_SIZE_FACTOR.getDefault(), Float.class, 0.6f);
private volatile float blockCacheMemoryFactor = blockCacheMemoryFactorDefault;
+ private static final long preheatedCacheMaxEntriesDefault =
+ parseValue(ConnectionParams.PREHEATED_CACHE_MAX_ENTRIES.getDefault(), Long.class, 4096L);
+ private volatile long preheatedCacheMaxEntries = preheatedCacheMaxEntriesDefault;
+
+ private static final long mppQueryResultMaxWaitInMillisDefault =
+ parseValue(ConnectionParams.MPP_QUERY_RESULT_MAX_WAIT_IN_MILLIS.getDefault(), Long.class, 10L);
+ private volatile long mppQueryResultMaxWaitInMillis = mppQueryResultMaxWaitInMillisDefault;
+
+ public long getMppQueryResultMaxWaitInMillis() {
+ return mppQueryResultMaxWaitInMillis;
+ }
+
+ public long getPreheatedCacheMaxEntries() {
+ return preheatedCacheMaxEntries;
+ }
+
+ private static final int cnDivPrecisionIncrementDefault =
+ parseValue(ConnectionParams.CN_DIV_PRECISION_INCREMENT.getDefault(), Integer.class, 4);
+ private volatile int cnDivPrecisionIncrement = cnDivPrecisionIncrementDefault;
+
+ public int getCnDivPrecisionIncrement() {
+ return cnDivPrecisionIncrement;
+ }
+
public float getBlockCacheMemoryFactor() {
return blockCacheMemoryFactor;
}
@@ -509,6 +800,12 @@ public long getOptimizerAlertLogInterval() {
return optimizerAlertLogInterval;
}
+ private volatile boolean enableHotGsiEvolution = true;
+
+ public boolean enableHotGsiEvolution() {
+ return enableHotGsiEvolution;
+ }
+
private volatile int tpSlowAlertThreshold = 10;
public int getTpSlowAlertThreshold() {
@@ -581,6 +878,42 @@ public int planCacheExpireTime() {
return planCacheExpireTime;
}
+ private volatile boolean enableColumnarPlanCache = true;
+
+ public boolean colPlanCache() {
+ return enableColumnarPlanCache;
+ }
+
+ private volatile boolean enableFloatingTypePrecision = true;
+
+ public boolean isEnableFloatingTypePrecision() {
+ return enableFloatingTypePrecision;
+ }
+
+ private volatile long deadlockDetection80FetchTrxRows = 100_000L;
+
+ public long getDeadlockDetection80FetchTrxRows() {
+ return deadlockDetection80FetchTrxRows;
+ }
+
+ private volatile long deadlockDetectionDataLockWaitsThreshold = 50_000L;
+
+ public long getDeadlockDetectionDataLockWaitsThreshold() {
+ return deadlockDetectionDataLockWaitsThreshold;
+ }
+
+ private volatile long deadlockDetectionSkipRound = 10L;
+
+ public long getDeadlockDetectionSkipRound() {
+ return deadlockDetectionSkipRound;
+ }
+
+ private volatile long maxKeepDeadlockLogs = 100L;
+
+ public long getMaxKeepDeadlockLogs() {
+ return maxKeepDeadlockLogs;
+ }
+
private static final int maxPartitionColumnCountDefault =
parseValue(ConnectionParams.MAX_PARTITION_COLUMN_COUNT.getDefault(), Integer.class, 3);
private volatile int maxPartitionColumnCount = maxPartitionColumnCountDefault;
@@ -705,6 +1038,12 @@ public boolean enableFollowReadForPolarDBX() {
return supportFollowRead;
}
+ private volatile boolean enableShareReadviewInRc = false;
+
+ public boolean isEnableShareReadviewInRc() {
+ return enableShareReadviewInRc;
+ }
+
/**
* Slow transaction threshold, unit: microsecond, default 3s.
*/
@@ -753,6 +1092,30 @@ public boolean enableXProtoOptForAutoSp() {
return xProtoOptForAutoSp;
}
+ private volatile long checkCciCheckpointLimit = 1;
+
+ public long getCheckCciCheckpointLimit() {
+ return checkCciCheckpointLimit;
+ }
+
+ private volatile boolean skipCheckCciScheduleJob = false;
+
+ public boolean isSkipCheckCciScheduleJob() {
+ return skipCheckCciScheduleJob;
+ }
+
+ private volatile boolean enableAutoGenColumnarSnapshot = true;
+
+ public boolean isEnableAutoGenColumnarSnapshot() {
+ return enableAutoGenColumnarSnapshot;
+ }
+
+ private volatile int autoGenColumnarSnapshotParallelism = 4;
+
+ public int getAutoGenColumnarSnapshotParallelism() {
+ return autoGenColumnarSnapshotParallelism;
+ }
+
private volatile boolean enableRemoteConsumeLog = false;
public boolean enableRemoteConsumeLog() {
@@ -809,6 +1172,16 @@ public void setSupportSingleDbMultiTbs(boolean supportSingleDbMultiTbs) {
this.supportSingleDbMultiTbs = supportSingleDbMultiTbs;
}
+ private volatile boolean enableChangeParamTypeByMeta = false;
+
+ public boolean isEnableChangeParamTypeByMeta() {
+ return enableChangeParamTypeByMeta;
+ }
+
+ public void setEnableChangeParamTypeByMeta(boolean enableChangeParamTypeByMeta) {
+ this.enableChangeParamTypeByMeta = enableChangeParamTypeByMeta;
+ }
+
public boolean isSupportRemoveDdl() {
return supportRemoveDdl;
}
@@ -867,6 +1240,12 @@ public void setColumnarOssDirectory(String columnarOssDirectory) {
this.columnarOssDirectory = columnarOssDirectory;
}
+ int ossStreamBufferSize = 8192;
+
+ public int getOssStreamBufferSize() {
+ return ossStreamBufferSize;
+ }
+
/**
* Default 60s.
*/
@@ -918,21 +1297,8 @@ public boolean isInstanceReadOnly() {
return instanceReadOnly;
}
- // 5 min.
- private volatile long minSnapshotKeepTime = 5 * 60 * 1000;
-
- public long getMinSnapshotKeepTime() {
- return minSnapshotKeepTime;
- }
-
- private volatile boolean forbidAutoCommitTrx = false;
-
private volatile Map errorCodeMapping = new HashMap<>();
- public boolean isForbidAutoCommitTrx() {
- return forbidAutoCommitTrx;
- }
-
public Map getErrorCodeMapping() {
return errorCodeMapping;
}
@@ -948,6 +1314,12 @@ private Map initErrorCodeMapping(String mapping) {
return new HashMap<>();
}
+ private volatile boolean enableAccurateInfoSchemaTables = false;
+
+ public boolean isEnableAccurateInfoSchemaTables() {
+ return enableAccurateInfoSchemaTables;
+ }
+
private boolean enableUseKeyForAllLocalIndex =
Boolean.valueOf(ConnectionParams.ENABLE_USE_KEY_FOR_ALL_LOCAL_INDEX.getDefault());
@@ -955,6 +1327,45 @@ public boolean isEnableUseKeyForAllLocalIndex() {
return enableUseKeyForAllLocalIndex;
}
+ private volatile boolean enableSyncPoint = false;
+
+ public boolean isEnableSyncPoint() {
+ return enableSyncPoint;
+ }
+
+ /**
+ * Default 5 * 60 * 1000 ms.
+ */
+ private volatile long syncPointTaskInterval = 5 * 60 * 1000;
+
+ public long getSyncPointTaskInterval() {
+ return syncPointTaskInterval;
+ }
+
+ private volatile boolean disableLegacyVariable = true;
+
+ public boolean isDisableLegacyVariable() {
+ return disableLegacyVariable;
+ }
+
+ private volatile int cciIncrementalCheckParallelism = 8;
+
+ public int getCciIncrementalCheckParallelism() {
+ return cciIncrementalCheckParallelism;
+ }
+
+ private volatile int cciIncrementalCheckBatchSize = 128;
+
+ public int getCciIncrementalCheckBatchSize() {
+ return cciIncrementalCheckBatchSize;
+ }
+
+ private volatile boolean enableColumnarDebug = false;
+
+ public boolean isEnableColumnarDebug() {
+ return enableColumnarDebug;
+ }
+
// pruning warning threshold in microsecond
private volatile long pruningTimeWarningThreshold = 500;
@@ -962,6 +1373,13 @@ public long getPruningTimeWarningThreshold() {
return pruningTimeWarningThreshold;
}
+ // ndv alike percentage threshold
+ private volatile long ndvAlikePercentageThreshold = 10L;
+
+ public long getNdvAlikePercentageThreshold() {
+ return ndvAlikePercentageThreshold;
+ }
+
private volatile boolean enablePruningIn = true;
private volatile boolean enablePruningInDml = true;
@@ -974,12 +1392,261 @@ public boolean isEnablePruningInDml() {
return enablePruningInDml;
}
+ private volatile boolean columnarBindMaster = false;
+
+ public boolean allowColumnarBindMaster() {
+ return columnarBindMaster;
+ }
+
+ private volatile boolean existColumnarNodes = false;
+
+ public void existColumnarNodes(boolean enable) {
+ this.existColumnarNodes = enable;
+ }
+
+ public boolean existColumnarNodes() {
+ return existColumnarNodes;
+ }
+
private volatile List blackListConf = new ArrayList<>();
public List getBlacklistConf() {
return blackListConf;
}
+ private volatile boolean showColumnarStatusUseSubQuery =
+ Boolean.parseBoolean(ConnectionParams.SHOW_COLUMNAR_STATUS_USE_SUB_QUERY.getDefault());
+
+ public boolean isShowColumnarStatusUseSubQuery() {
+ return showColumnarStatusUseSubQuery;
+ }
+
+ public volatile int ttlGlobalSelectWorkerCount =
+ Integer.valueOf(ConnectionParams.TTL_GLOBAL_SELECT_WORKER_COUNT.getDefault());
+
+ public volatile int ttlGlobalDeleteWorkerCount =
+ Integer.valueOf(ConnectionParams.TTL_GLOBAL_DELETE_WORKER_COUNT.getDefault());
+
+ public volatile long ttlTmpTableMaxDataLength =
+ Long.valueOf(ConnectionParams.TTL_TMP_TBL_MAX_DATA_LENGTH.getDefault());
+
+ public volatile int ttlTmpTableMaxDataFreePercent =
+ Integer.valueOf(ConnectionParams.TTL_TBL_MAX_DATA_FREE_PERCENT.getDefault());
+ ;
+
+ public volatile int ttlIntraTaskInterruptionMaxWaitTime =
+ Integer.valueOf(ConnectionParams.TTL_INTRA_TASK_INTERRUPTION_MAX_WAIT_TIME.getDefault());
+
+ public volatile int ttlIntraTaskMonitorEachRoundWaitTime =
+ Integer.valueOf(ConnectionParams.TTL_INTRA_TASK_MONITOR_EACH_ROUTE_WAIT_TIME.getDefault());
+
+ public volatile int ttlScheduledJobMaxParallelism =
+ Integer.valueOf(ConnectionParams.TTL_SCHEDULED_JOB_MAX_PARALLELISM.getDefault());
+ ;
+
+ public volatile boolean ttlEnableAutoOptimizeTableInTtlJob =
+ Boolean.valueOf(ConnectionParams.TTL_ENABLE_AUTO_OPTIMIZE_TABLE_IN_TTL_JOB.getDefault());
+
+ public volatile boolean ttlEnableAutoExecOptimizeTableAfterArchiving =
+ Boolean.valueOf(ConnectionParams.TTL_ENABLE_AUTO_EXEC_OPTIMIZE_TABLE_AFTER_ARCHIVING.getDefault());
+ ;
+ public volatile int ttlJobDefaultBatchSize =
+ Integer.valueOf(ConnectionParams.TTL_JOB_DEFAULT_BATCH_SIZE.getDefault());
+
+ public volatile int ttlCleanupBoundIntervalCount =
+ Integer.valueOf(ConnectionParams.TTL_CLEANUP_BOUND_INTERVAL_COUNT.getDefault());
+
+ public volatile boolean ttlStopAllJobScheduling =
+ Boolean.valueOf(ConnectionParams.TTL_STOP_ALL_JOB_SCHEDULING.getDefault());
+
+ public volatile boolean ttlUseArchiveTransPolicy =
+ Boolean.valueOf(ConnectionParams.TTL_USE_ARCHIVE_TRANS_POLICY.getDefault());
+
+ public volatile int ttlSelectMergeUnionSize =
+ Integer.valueOf(ConnectionParams.TTL_SELECT_MERGE_UNION_SIZE.getDefault());
+
+ public volatile boolean ttlSelectMergeConcurrent =
+ Boolean.valueOf(ConnectionParams.TTL_SELECT_MERGE_CONCURRENT.getDefault());
+
+ public volatile String ttlSelectStmtHint =
+ String.valueOf(ConnectionParams.TTL_SELECT_STMT_HINT.getDefault());
+
+ public volatile String ttlDeleteStmtHint =
+ String.valueOf(ConnectionParams.TTL_DELETE_STMT_HINT.getDefault());
+
+ public volatile String ttlInsertStmtHint =
+ String.valueOf(ConnectionParams.TTL_INSERT_STMT_HINT.getDefault());
+
+ public volatile String ttlOptimizeTableStmtHint =
+ String.valueOf(ConnectionParams.TTL_OPTIMIZE_TABLE_STMT_HINT.getDefault());
+
+ public volatile String ttlAlterTableAddPartsStmtHint =
+ String.valueOf(ConnectionParams.TTL_ALTER_ADD_PART_STMT_HINT.getDefault());
+
+ public volatile Long ttlGroupParallelismOnDqlConn =
+ Long.valueOf(ConnectionParams.TTL_GROUP_PARALLELISM_ON_DQL_CONN.getDefault());
+
+ public volatile Long ttlGroupParallelismOnDmlConn =
+ Long.valueOf(ConnectionParams.TTL_GROUP_PARALLELISM_ON_DML_CONN.getDefault());
+
+ public volatile Boolean ttlAddMaxValPartOnCciCreating =
+ Boolean.valueOf(ConnectionParams.TTL_ADD_MAXVAL_PART_ON_CCI_CREATING.getDefault());
+
+ public volatile Long ttlMaxWaitAcquireRatePermitsPeriods =
+ Long.valueOf(ConnectionParams.TTL_MAX_WAIT_ACQUIRE_RATE_PERMITS_PERIODS.getDefault());
+
+ public volatile Boolean ttlEnableCleanupRowsSpeedLimit =
+ Boolean.valueOf(ConnectionParams.TTL_ENABLE_CLEANUP_ROWS_SPEED_LIMIT.getDefault());
+
+ public volatile Long ttlCleanupRowsSpeedLimitEachDn =
+ Long.valueOf(ConnectionParams.TTL_CLEANUP_ROWS_SPEED_LIMIT_EACH_DN.getDefault());
+
+ public volatile Boolean ttlIgnoreMaintainWindowInDdlJob =
+ Boolean.valueOf(ConnectionParams.TTL_IGNORE_MAINTAIN_WINDOW_IN_DDL_JOB.getDefault());
+
+ public volatile int ttlGlobalWorkerDnRatio =
+ Integer.valueOf(ConnectionParams.TTL_GLOBAL_WORKER_DN_RATIO.getDefault());
+
+ public volatile int ttlDefaultArcPreAllocateCount =
+ Integer.valueOf(ConnectionParams.TTL_DEFAULT_ARC_PRE_ALLOCATE_COUNT.getDefault());
+
+ public volatile int ttlDefaultArcPostAllocateCount =
+ Integer.valueOf(ConnectionParams.TTL_DEFAULT_ARC_POST_ALLOCATE_COUNT.getDefault());
+
+ public volatile boolean ttlEnableAutoAddPartsForArcCci =
+ Boolean.valueOf(ConnectionParams.TTL_ENABLE_AUTO_ADD_PARTS_FOR_ARC_CCI.getDefault());
+
+ public int getTtlGlobalDeleteWorkerCount() {
+ return ttlGlobalDeleteWorkerCount;
+ }
+
+ public long getTtlTmpTableMaxDataLength() {
+ return ttlTmpTableMaxDataLength;
+ }
+
+ public int getTtlTmpTableMaxDataFreePercent() {
+ return ttlTmpTableMaxDataFreePercent;
+ }
+
+ public int getTtlIntraTaskInterruptionMaxWaitTime() {
+ return ttlIntraTaskInterruptionMaxWaitTime;
+ }
+
+ public int getTtlScheduledJobMaxParallelism() {
+ return ttlScheduledJobMaxParallelism;
+ }
+
+ public boolean isTtlEnableAutoOptimizeTableInTtlJob() {
+ return ttlEnableAutoOptimizeTableInTtlJob;
+ }
+
+ public boolean isTtlEnableAutoExecOptimizeTableAfterArchiving() {
+ return ttlEnableAutoExecOptimizeTableAfterArchiving;
+ }
+
+ public int getTtlIntraTaskMonitorEachRoundWaitTime() {
+ return ttlIntraTaskMonitorEachRoundWaitTime;
+ }
+
+ public int getTtlJobDefaultBatchSize() {
+ return ttlJobDefaultBatchSize;
+ }
+
+ public int getTtlCleanupBoundIntervalCount() {
+ return ttlCleanupBoundIntervalCount;
+ }
+
+ public boolean isTtlStopAllJobScheduling() {
+ return ttlStopAllJobScheduling;
+ }
+
+ public boolean isTtlUseArchiveTransPolicy() {
+ return ttlUseArchiveTransPolicy;
+ }
+
+ public int getTtlSelectMergeUnionSize() {
+ return ttlSelectMergeUnionSize;
+ }
+
+ public boolean isTtlSelectMergeConcurrent() {
+ return ttlSelectMergeConcurrent;
+ }
+
+ public String getTtlSelectStmtHint() {
+ return ttlSelectStmtHint;
+ }
+
+ public String getTtlDeleteStmtHint() {
+ return ttlDeleteStmtHint;
+ }
+
+ public String getTtlInsertStmtHint() {
+ return ttlInsertStmtHint;
+ }
+
+ public Long getTtlGroupParallelismOnDmlConn() {
+ return ttlGroupParallelismOnDmlConn;
+ }
+
+ public Long getTtlGroupParallelismOnDqlConn() {
+ return ttlGroupParallelismOnDqlConn;
+ }
+
+ public String getTtlOptimizeTableStmtHint() {
+ return ttlOptimizeTableStmtHint;
+ }
+
+ public String getTtlAlterTableAddPartsStmtHint() {
+ return ttlAlterTableAddPartsStmtHint;
+ }
+
+ public Boolean getTtlAddMaxValPartOnCciCreating() {
+ return ttlAddMaxValPartOnCciCreating;
+ }
+
+ public Long getTtlCleanupRowsSpeedLimitEachDn() {
+ return ttlCleanupRowsSpeedLimitEachDn;
+ }
+
+ public Boolean getTtlEnableCleanupRowsSpeedLimit() {
+ return ttlEnableCleanupRowsSpeedLimit;
+ }
+
+ public Long getTtlMaxWaitAcquireRatePermitsPeriods() {
+ return ttlMaxWaitAcquireRatePermitsPeriods;
+ }
+
+ public Boolean getTtlIgnoreMaintainWindowInDdlJob() {
+ return ttlIgnoreMaintainWindowInDdlJob;
+ }
+
+ public int getTtlGlobalSelectWorkerCount() {
+ return ttlGlobalSelectWorkerCount;
+ }
+
+ public int getTtlGlobalWorkerDnRatio() {
+ return ttlGlobalWorkerDnRatio;
+ }
+
+ public int getTtlDefaultArcPreAllocateCount() {
+ return ttlDefaultArcPreAllocateCount;
+ }
+
+ public int getTtlDefaultArcPostAllocateCount() {
+ return ttlDefaultArcPostAllocateCount;
+ }
+
+ public boolean getTtlEnableAutoAddPartsForArcCci() {
+ return ttlEnableAutoAddPartsForArcCci;
+ }
+
+ private volatile long waitForColumnarCommitMS =
+ Long.parseLong(ConnectionParams.WAIT_FOR_COLUMNAR_COMMIT_MS.getDefault());
+
+ public long getWaitForColumnarCommitMS() {
+ return waitForColumnarCommitMS;
+ }
+
public static T parseValue(String value, Class type, T defaultValue) {
if (value == null) {
return defaultValue;
@@ -1003,4 +1670,5 @@ public static T parseValue(String value, Class type, T defaultValue) {
}
private static final DynamicConfig instance = new DynamicConfig();
+
}
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/properties/MppConfig.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/properties/MppConfig.java
index 27871e17f..7ff6e93f2 100644
--- a/polardbx-common/src/main/java/com/alibaba/polardbx/common/properties/MppConfig.java
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/properties/MppConfig.java
@@ -26,6 +26,7 @@
import java.util.List;
import java.util.stream.Collectors;
+import static com.alibaba.polardbx.common.properties.ConnectionProperties.ENABLE_MPP_UI;
import static com.alibaba.polardbx.common.properties.ConnectionProperties.MPP_ALLOCATOR_SIZE;
import static com.alibaba.polardbx.common.properties.ConnectionProperties.MPP_AP_PRIORITY;
import static com.alibaba.polardbx.common.properties.ConnectionProperties.MPP_CLUSTER_NAME;
@@ -274,19 +275,32 @@ public void loadValue(Logger logger, String key, String value) {
case MPP_CLUSTER_NAME:
defaultCluster = parseValue(value, String.class, DEFAULT_MPP_CLUSTER_NAME);
break;
-
case MPP_SPILL_PATHS:
List spillPathsSplit = ImmutableList.copyOf(
Splitter.on(",").trimResults().omitEmptyStrings().split(value));
spillPaths = spillPathsSplit.stream().map(path -> Paths.get(path)).collect(Collectors.toList());
break;
+ case ENABLE_MPP_UI:
+ this.enableMppUI = parseValue(value, Boolean.class, DEFAULT_ENABLE_MPP_UI);
+ break;
default:
logger.warn("unknown mpp config:" + key + ",value=" + value);
}
}
}
+ //-------------------------------------------- web UI ----------------------------------------------------
+ private static final boolean DEFAULT_ENABLE_MPP_UI = true;
+ /**
+ * Requires restart
+ */
+ private boolean enableMppUI = DEFAULT_ENABLE_MPP_UI;
+
+ public boolean isEnableMppUI() {
+ return enableMppUI;
+ }
+ //-------------------------------------------- query thread pool------------------------------------------
private static final int DEFAULT_MPP_QUERY_MANAGER_THREAD_POOL_SIZE = 1;
private int queryManagerThreadPoolSize = DEFAULT_MPP_QUERY_MANAGER_THREAD_POOL_SIZE;
diff --git a/polardbx-common/src/main/java/com/alibaba/polardbx/common/scheduler/FiredScheduledJobState.java b/polardbx-common/src/main/java/com/alibaba/polardbx/common/scheduler/FiredScheduledJobState.java
index 5fb445138..14e1c525c 100644
--- a/polardbx-common/src/main/java/com/alibaba/polardbx/common/scheduler/FiredScheduledJobState.java
+++ b/polardbx-common/src/main/java/com/alibaba/polardbx/common/scheduler/FiredScheduledJobState.java
@@ -18,6 +18,16 @@
public enum FiredScheduledJobState {
+ /**
+ *
+ * state machine:
+ * status of scheduled_job : ENABLED
+ * status of fired_scheduled_job: ->QUEUED(init) ->RUNNING ->SUCCESS
+ * ->FAILED
+ * ->SKIPED
+ * ->INTERUPTED (actively exit by task itself)
+ *