Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
46eae6c8
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
46eae6c8
编写于
7月 11, 2020
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-904] change replica definition
上级
58943ab3
变更
10
显示空白变更内容
内联
并排
Showing
10 changed file
with
18 addition
and
18 deletion
+18
-18
src/client/src/tscAsync.c
src/client/src/tscAsync.c
+1
-1
src/client/src/tscPrepare.c
src/client/src/tscPrepare.c
+1
-1
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+2
-2
src/client/src/tscSql.c
src/client/src/tscSql.c
+1
-1
src/client/src/tscSub.c
src/client/src/tscSub.c
+1
-1
src/client/src/tscUtil.c
src/client/src/tscUtil.c
+2
-2
src/common/src/tglobal.c
src/common/src/tglobal.c
+3
-3
src/inc/taosdef.h
src/inc/taosdef.h
+3
-3
src/inc/taosmsg.h
src/inc/taosmsg.h
+1
-1
src/mnode/src/mnodeDb.c
src/mnode/src/mnodeDb.c
+3
-3
未找到文件。
src/client/src/tscAsync.c
浏览文件 @
46eae6c8
...
...
@@ -43,7 +43,7 @@ void doAsyncQuery(STscObj* pObj, SSqlObj* pSql, void (*fp)(), void* param, const
pSql
->
signature
=
pSql
;
pSql
->
param
=
param
;
pSql
->
pTscObj
=
pObj
;
pSql
->
maxRetry
=
TSDB_MAX_REPLICA
_NUM
;
pSql
->
maxRetry
=
TSDB_MAX_REPLICA
;
pSql
->
fp
=
fp
;
pSql
->
sqlstr
=
calloc
(
1
,
sqlLen
+
1
);
...
...
src/client/src/tscPrepare.c
浏览文件 @
46eae6c8
...
...
@@ -497,7 +497,7 @@ TAOS_STMT* taos_stmt_init(TAOS* taos) {
tsem_init
(
&
pSql
->
rspSem
,
0
,
0
);
pSql
->
signature
=
pSql
;
pSql
->
pTscObj
=
pObj
;
pSql
->
maxRetry
=
TSDB_MAX_REPLICA
_NUM
;
pSql
->
maxRetry
=
TSDB_MAX_REPLICA
;
pStmt
->
pSql
=
pSql
;
return
pStmt
;
...
...
src/client/src/tscSQLParser.c
浏览文件 @
46eae6c8
...
...
@@ -5489,9 +5489,9 @@ int32_t tscCheckCreateDbParams(SSqlCmd* pCmd, SCMCreateDbMsg* pCreate) {
}
if
(
pCreate
->
replications
!=
-
1
&&
(
pCreate
->
replications
<
TSDB_MIN_
REPLICA_NUM
||
pCreate
->
replications
>
TSDB_MAX_REPLICA_NUM
))
{
(
pCreate
->
replications
<
TSDB_MIN_
DB_REPLICA_OPTION
||
pCreate
->
replications
>
TSDB_MAX_DB_REPLICA_OPTION
))
{
snprintf
(
msg
,
tListLen
(
msg
),
"invalid db option replications: %d valid range: [%d, %d]"
,
pCreate
->
replications
,
TSDB_MIN_
REPLICA_NUM
,
TSDB_MAX_REPLICA_NUM
);
TSDB_MIN_
DB_REPLICA_OPTION
,
TSDB_MAX_DB_REPLICA_OPTION
);
return
invalidSqlErrMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg
);
}
...
...
src/client/src/tscSql.c
浏览文件 @
46eae6c8
...
...
@@ -113,7 +113,7 @@ SSqlObj *taosConnectImpl(const char *ip, const char *user, const char *pass, con
pSql
->
pTscObj
=
pObj
;
pSql
->
signature
=
pSql
;
pSql
->
maxRetry
=
TSDB_MAX_REPLICA
_NUM
;
pSql
->
maxRetry
=
TSDB_MAX_REPLICA
;
tsem_init
(
&
pSql
->
rspSem
,
0
,
0
);
pObj
->
pDnodeConn
=
pDnodeConn
;
...
...
src/client/src/tscSub.c
浏览文件 @
46eae6c8
...
...
@@ -107,7 +107,7 @@ static SSub* tscCreateSubscription(STscObj* pObj, const char* topic, const char*
pSql
->
signature
=
pSql
;
pSql
->
param
=
pSql
;
pSql
->
pTscObj
=
pObj
;
pSql
->
maxRetry
=
TSDB_MAX_REPLICA
_NUM
;
pSql
->
maxRetry
=
TSDB_MAX_REPLICA
;
pSql
->
fp
=
asyncCallback
;
int
code
=
tscAllocPayload
(
pCmd
,
TSDB_DEFAULT_PAYLOAD_SIZE
);
...
...
src/client/src/tscUtil.c
浏览文件 @
46eae6c8
...
...
@@ -1649,7 +1649,7 @@ SSqlObj* createSimpleSubObj(SSqlObj* pSql, void (*fp)(), void* param, int32_t cm
pNew
->
fp
=
fp
;
pNew
->
param
=
param
;
pNew
->
maxRetry
=
TSDB_MAX_REPLICA
_NUM
;
pNew
->
maxRetry
=
TSDB_MAX_REPLICA
;
pNew
->
sqlstr
=
strdup
(
pSql
->
sqlstr
);
if
(
pNew
->
sqlstr
==
NULL
)
{
...
...
@@ -1804,7 +1804,7 @@ SSqlObj* createSubqueryObj(SSqlObj* pSql, int16_t tableIndex, void (*fp)(), void
pNew
->
fp
=
fp
;
pNew
->
param
=
param
;
pNew
->
maxRetry
=
TSDB_MAX_REPLICA
_NUM
;
pNew
->
maxRetry
=
TSDB_MAX_REPLICA
;
char
*
name
=
pTableMetaInfo
->
name
;
STableMetaInfo
*
pFinalInfo
=
NULL
;
...
...
src/common/src/tglobal.c
浏览文件 @
46eae6c8
...
...
@@ -110,7 +110,7 @@ int16_t tsCommitTime = TSDB_DEFAULT_COMMIT_TIME; // seconds
int32_t
tsTimePrecision
=
TSDB_DEFAULT_PRECISION
;
int16_t
tsCompression
=
TSDB_DEFAULT_COMP_LEVEL
;
int16_t
tsWAL
=
TSDB_DEFAULT_WAL_LEVEL
;
int32_t
tsReplications
=
TSDB_DEFAULT_
REPLICA_NUM
;
int32_t
tsReplications
=
TSDB_DEFAULT_
DB_REPLICA_OPTION
;
int32_t
tsMaxVgroupsPerDb
=
0
;
int32_t
tsMaxTablePerVnode
=
TSDB_DEFAULT_TABLES
;
// balance
...
...
@@ -706,8 +706,8 @@ static void doInitGlobalConfig() {
cfg
.
ptr
=
&
tsReplications
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT32
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
;
cfg
.
minValue
=
TSDB_MIN_
REPLICA_NUM
;
cfg
.
maxValue
=
TSDB_MAX_
REPLICA_NUM
;
cfg
.
minValue
=
TSDB_MIN_
DB_REPLICA_OPTION
;
cfg
.
maxValue
=
TSDB_MAX_
DB_REPLICA_OPTION
;
cfg
.
ptrLength
=
0
;
cfg
.
unitType
=
TAOS_CFG_UTYPE_NONE
;
taosInitConfigOption
(
cfg
);
...
...
src/inc/taosdef.h
浏览文件 @
46eae6c8
...
...
@@ -332,9 +332,9 @@ void tsDataSwap(void *pLeft, void *pRight, int32_t type, int32_t size);
#define TSDB_MAX_WAL_LEVEL 2
#define TSDB_DEFAULT_WAL_LEVEL 1
#define TSDB_MIN_
REPLICA_NUM
1
#define TSDB_MAX_
REPLICA_NUM
3
#define TSDB_DEFAULT_
REPLICA_NUM
1
#define TSDB_MIN_
DB_REPLICA_OPTION
1
#define TSDB_MAX_
DB_REPLICA_OPTION
3
#define TSDB_DEFAULT_
DB_REPLICA_OPTION
1
#define TSDB_MAX_JOIN_TABLE_NUM 5
#define TSDB_MAX_UNION_CLAUSE 5
...
...
src/inc/taosmsg.h
浏览文件 @
46eae6c8
...
...
@@ -646,7 +646,7 @@ typedef struct SCMSTableVgroupMsg {
typedef
struct
{
int32_t
vgId
;
int8_t
numOfIps
;
SIpAddr
ipAddr
[
TSDB_MAX_REPLICA
_NUM
];
SIpAddr
ipAddr
[
TSDB_MAX_REPLICA
];
}
SCMVgroupInfo
;
typedef
struct
{
...
...
src/mnode/src/mnodeDb.c
浏览文件 @
46eae6c8
...
...
@@ -287,9 +287,9 @@ static int32_t mnodeCheckDbCfg(SDbCfg *pCfg) {
return
TSDB_CODE_MND_INVALID_DB_OPTION
;
}
if
(
pCfg
->
replications
<
TSDB_MIN_
REPLICA_NUM
||
pCfg
->
replications
>
TSDB_MAX_REPLICA_NUM
)
{
mError
(
"invalid db option replications:%d valid range: [%d, %d]"
,
pCfg
->
replications
,
TSDB_MIN_
REPLICA_NUM
,
TSDB_MAX_
REPLICA_NUM
);
if
(
pCfg
->
replications
<
TSDB_MIN_
DB_REPLICA_OPTION
||
pCfg
->
replications
>
TSDB_MAX_DB_REPLICA_OPTION
)
{
mError
(
"invalid db option replications:%d valid range: [%d, %d]"
,
pCfg
->
replications
,
TSDB_MIN_
DB_REPLICA_OPTION
,
TSDB_MAX_
DB_REPLICA_OPTION
);
return
TSDB_CODE_MND_INVALID_DB_OPTION
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录