Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
冷面1992
TDengine
提交
2afaf1a0
TDengine
项目概览
冷面1992
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2afaf1a0
编写于
8月 20, 2021
作者:
S
shenglian zhou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
schemaless:multi-thread ignore some errors
上级
ae23e50a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
41 addition
and
0 deletion
+41
-0
src/client/src/tscParseLineProtocol.c
src/client/src/tscParseLineProtocol.c
+25
-0
src/inc/taoserror.h
src/inc/taoserror.h
+3
-0
src/mnode/src/mnodeTable.c
src/mnode/src/mnodeTable.c
+13
-0
未找到文件。
src/client/src/tscParseLineProtocol.c
浏览文件 @
2afaf1a0
...
...
@@ -371,6 +371,11 @@ static int32_t applySchemaAction(TAOS* taos, SSchemaAction* action, SSmlLinesInf
buildColumnDescription
(
action
->
alterSTable
.
field
,
result
+
n
,
capacity
-
n
,
&
outBytes
);
TAOS_RES
*
res
=
taos_query
(
taos
,
result
);
//TODO async doAsyncQuery
code
=
taos_errno
(
res
);
if
(
code
==
TSDB_CODE_MND_FIELD_ALREAY_EXIST
)
{
TAOS_RES
*
res2
=
taos_query
(
taos
,
"RESET QUERY CACHE"
);
code
=
taos_errno
(
res2
);
taos_free_result
(
res2
);
}
taos_free_result
(
res
);
break
;
}
...
...
@@ -380,6 +385,11 @@ static int32_t applySchemaAction(TAOS* taos, SSchemaAction* action, SSmlLinesInf
result
+
n
,
capacity
-
n
,
&
outBytes
);
TAOS_RES
*
res
=
taos_query
(
taos
,
result
);
//TODO async doAsyncQuery
code
=
taos_errno
(
res
);
if
(
code
==
TSDB_CODE_MND_TAG_ALREAY_EXIST
)
{
TAOS_RES
*
res2
=
taos_query
(
taos
,
"RESET QUERY CACHE"
);
code
=
taos_errno
(
res2
);
taos_free_result
(
res2
);
}
taos_free_result
(
res
);
break
;
}
...
...
@@ -389,6 +399,11 @@ static int32_t applySchemaAction(TAOS* taos, SSchemaAction* action, SSmlLinesInf
capacity
-
n
,
&
outBytes
);
TAOS_RES
*
res
=
taos_query
(
taos
,
result
);
//TODO async doAsyncQuery
code
=
taos_errno
(
res
);
if
(
code
==
TSDB_CODE_MND_INVALID_COLUMN_LENGTH
)
{
TAOS_RES
*
res2
=
taos_query
(
taos
,
"RESET QUERY CACHE"
);
code
=
taos_errno
(
res2
);
taos_free_result
(
res2
);
}
taos_free_result
(
res
);
break
;
}
...
...
@@ -398,6 +413,11 @@ static int32_t applySchemaAction(TAOS* taos, SSchemaAction* action, SSmlLinesInf
capacity
-
n
,
&
outBytes
);
TAOS_RES
*
res
=
taos_query
(
taos
,
result
);
//TODO async doAsyncQuery
code
=
taos_errno
(
res
);
if
(
code
==
TSDB_CODE_MND_INVALID_TAG_LENGTH
)
{
TAOS_RES
*
res2
=
taos_query
(
taos
,
"RESET QUERY CACHE"
);
code
=
taos_errno
(
res2
);
taos_free_result
(
res2
);
}
taos_free_result
(
res
);
break
;
}
...
...
@@ -427,6 +447,11 @@ static int32_t applySchemaAction(TAOS* taos, SSchemaAction* action, SSmlLinesInf
outBytes
=
snprintf
(
pos
,
freeBytes
,
")"
);
TAOS_RES
*
res
=
taos_query
(
taos
,
result
);
code
=
taos_errno
(
res
);
if
(
code
==
TSDB_CODE_MND_TABLE_ALREADY_EXIST
)
{
TAOS_RES
*
res2
=
taos_query
(
taos
,
"RESET QUERY CACHE"
);
code
=
taos_errno
(
res2
);
taos_free_result
(
res2
);
}
taos_free_result
(
res
);
break
;
}
...
...
src/inc/taoserror.h
浏览文件 @
2afaf1a0
...
...
@@ -211,6 +211,9 @@ int32_t* taosGetErrno();
#define TSDB_CODE_DND_TOO_MANY_VNODES TAOS_DEF_ERROR_CODE(0, 0x0405) //"Too many vnode directories")
#define TSDB_CODE_DND_EXITING TAOS_DEF_ERROR_CODE(0, 0x0406) //"Dnode is exiting"
#define TSDB_CODE_MND_INVALID_TAG_LENGTH TAOS_DEF_ERROR_CODE(0, 0x410) //"invalid tag length")
#define TSDB_CODE_MND_INVALID_COLUMN_LENGTH TAOS_DEF_ERROR_CODE(0, 0x411) //"invalid column length")
// vnode
#define TSDB_CODE_VND_ACTION_IN_PROGRESS TAOS_DEF_ERROR_CODE(0, 0x0500) //"Action in progress")
#define TSDB_CODE_VND_MSG_NOT_PROCESSED TAOS_DEF_ERROR_CODE(0, 0x0501) //"Message not processed")
...
...
src/mnode/src/mnodeTable.c
浏览文件 @
2afaf1a0
...
...
@@ -1519,6 +1519,13 @@ static int32_t mnodeChangeSuperTableColumn(SMnodeMsg *pMsg) {
SSchema
*
schema
=
(
SSchema
*
)
(
pStable
->
schema
+
col
);
ASSERT
(
schema
->
type
==
TSDB_DATA_TYPE_BINARY
||
schema
->
type
==
TSDB_DATA_TYPE_NCHAR
);
schema
->
bytes
=
pAlter
->
schema
[
0
].
bytes
;
if
(
pAlter
->
schema
[
0
].
bytes
<=
schema
->
bytes
)
{
mError
(
"msg:%p, app:%p stable:%s, modify column len. column:%s, len from %d to %d"
,
pMsg
,
pMsg
->
rpcMsg
.
ahandle
,
pStable
->
info
.
tableId
,
name
,
schema
->
bytes
,
pAlter
->
schema
[
0
].
bytes
);
return
TSDB_CODE_MND_INVALID_COLUMN_LENGTH
;
}
pStable
->
sversion
++
;
mInfo
(
"msg:%p, app:%p stable %s, start to modify column %s len to %d"
,
pMsg
,
pMsg
->
rpcMsg
.
ahandle
,
pStable
->
info
.
tableId
,
name
,
schema
->
bytes
);
...
...
@@ -1548,6 +1555,12 @@ static int32_t mnodeChangeSuperTableTag(SMnodeMsg *pMsg) {
// update
SSchema
*
schema
=
(
SSchema
*
)
(
pStable
->
schema
+
col
+
pStable
->
numOfColumns
);
ASSERT
(
schema
->
type
==
TSDB_DATA_TYPE_BINARY
||
schema
->
type
==
TSDB_DATA_TYPE_NCHAR
);
if
(
pAlter
->
schema
[
0
].
bytes
<=
schema
->
bytes
)
{
mError
(
"msg:%p, app:%p stable:%s, modify tag len. tag:%s, len from %d to %d"
,
pMsg
,
pMsg
->
rpcMsg
.
ahandle
,
pStable
->
info
.
tableId
,
name
,
schema
->
bytes
,
pAlter
->
schema
[
0
].
bytes
);
return
TSDB_CODE_MND_INVALID_TAG_LENGTH
;
}
schema
->
bytes
=
pAlter
->
schema
[
0
].
bytes
;
pStable
->
tversion
++
;
mInfo
(
"msg:%p, app:%p stable %s, start to modify tag len %s to %d"
,
pMsg
,
pMsg
->
rpcMsg
.
ahandle
,
pStable
->
info
.
tableId
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录