From 80183ad8f3d81214544040acdafbec29f0137934 Mon Sep 17 00:00:00 2001 From: kailixu Date: Thu, 20 Feb 2025 11:11:27 +0800 Subject: [PATCH] enh: grant support TDgpt --- include/common/tgrant.h | 1 + include/util/taoserror.h | 1 + source/util/src/terror.c | 1 + source/util/test/errorCodeTable.ini | 1 + tests/system-test/0-others/information_schema.py | 1 + 5 files changed, 5 insertions(+) diff --git a/include/common/tgrant.h b/include/common/tgrant.h index 1660cc6a1b..17a383f7c6 100644 --- a/include/common/tgrant.h +++ b/include/common/tgrant.h @@ -61,6 +61,7 @@ typedef enum { TSDB_GRANT_ACTIVE_ACTIVE, TSDB_GRANT_DUAL_REPLICA_HA, TSDB_GRANT_DB_ENCRYPTION, + TSDB_GRANT_TD_GPT, } EGrantType; int32_t checkAndGetCryptKey(const char *encryptCode, const char *machineId, char **key); diff --git a/include/util/taoserror.h b/include/util/taoserror.h index 397118411c..c93e1ffde4 100644 --- a/include/util/taoserror.h +++ b/include/util/taoserror.h @@ -693,6 +693,7 @@ int32_t taosGetErrSize(); #define TSDB_CODE_GRANT_OBJECT_STROAGE_EXPIRED TAOS_DEF_ERROR_CODE(0, 0x082B) #define TSDB_CODE_GRANT_DUAL_REPLICA_HA_EXPIRED TAOS_DEF_ERROR_CODE(0, 0x082C) #define TSDB_CODE_GRANT_DB_ENCRYPTION_EXPIRED TAOS_DEF_ERROR_CODE(0, 0x082D) +#define TSDB_CODE_GRANT_TD_GPT_EXPIRED TAOS_DEF_ERROR_CODE(0, 0x082E) // sync // #define TSDB_CODE_SYN_INVALID_CONFIG TAOS_DEF_ERROR_CODE(0, 0x0900) // 2.x diff --git a/source/util/src/terror.c b/source/util/src/terror.c index f34b00bec5..7e32a198e4 100644 --- a/source/util/src/terror.c +++ b/source/util/src/terror.c @@ -564,6 +564,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_MULTI_STORAGE_EXPIRED, "License expired for m TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_OBJECT_STROAGE_EXPIRED, "License expired for object storage function") TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_DUAL_REPLICA_HA_EXPIRED,"License expired for dual-replica HA function") TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_DB_ENCRYPTION_EXPIRED, "License expired for database encryption function") +TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_TD_GPT_EXPIRED, "License expired for TDgpt function") // sync TAOS_DEFINE_ERROR(TSDB_CODE_SYN_TIMEOUT, "Sync timeout") diff --git a/source/util/test/errorCodeTable.ini b/source/util/test/errorCodeTable.ini index f67c8ab834..717499ca75 100644 --- a/source/util/test/errorCodeTable.ini +++ b/source/util/test/errorCodeTable.ini @@ -400,6 +400,7 @@ TSDB_CODE_GRANT_MULTI_STORAGE_EXPIRED = 0x8000082A TSDB_CODE_GRANT_OBJECT_STROAGE_EXPIRED = 0x8000082B TSDB_CODE_GRANT_DUAL_REPLICA_HA_EXPIRED = 0x8000082C TSDB_CODE_GRANT_DB_ENCRYPTION_EXPIRED = 0x8000082D +TSDB_CODE_GRANT_TD_GPT_EXPIRED = 0x8000082E TSDB_CODE_SYN_TIMEOUT = 0x80000903 TSDB_CODE_SYN_MISMATCHED_SIGNATURE = 0x80000907 TSDB_CODE_SYN_NOT_LEADER = 0x8000090C diff --git a/tests/system-test/0-others/information_schema.py b/tests/system-test/0-others/information_schema.py index 96cd596a20..63f0a236c3 100644 --- a/tests/system-test/0-others/information_schema.py +++ b/tests/system-test/0-others/information_schema.py @@ -283,6 +283,7 @@ class TDTestCase: 'active_active':'Active-Active', 'dual_replica':'Dual-Replica HA', 'db_encryption':'Database Encryption', + 'tdgpt':'TDgpt', 'opc_da':'OPC_DA', 'opc_ua':'OPC_UA', 'pi':'Pi',