Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
7570c7ff
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看板
未验证
提交
7570c7ff
编写于
11月 27, 2019
作者:
H
haojun Liao
提交者:
GitHub
11月 27, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #784 from taosdata/feature/slguan
Handling cluster bugs
上级
e39bd679
a68ca3f0
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
46 addition
and
6 deletion
+46
-6
src/sdb/src/sdbEngine.c
src/sdb/src/sdbEngine.c
+46
-4
src/system/detail/src/mgmtMeter.c
src/system/detail/src/mgmtMeter.c
+0
-2
未找到文件。
src/sdb/src/sdbEngine.c
浏览文件 @
7570c7ff
...
...
@@ -353,8 +353,33 @@ int64_t sdbInsertRow(void *handle, void *row, int rowSize) {
if
((
pTable
->
keyType
!=
SDB_KEYTYPE_AUTO
)
||
*
((
int64_t
*
)
row
))
if
(
sdbGetRow
(
handle
,
row
))
{
sdbError
(
"table:%s, failed to insert record, sdbVersion:%d"
,
pTable
->
name
,
sdbVersion
);
return
-
1
;
if
(
strcmp
(
pTable
->
name
,
"mnode"
)
==
0
)
{
/*
* The first mnode created when the system just start, so the insert action may failed
* see sdbPeer.c : sdbInitPeers
*/
pTable
->
id
++
;
sdbVersion
++
;
sdbPrint
(
"table:%s, record:%s already exist, think it successed, sdbVersion:%ld id:%d"
,
pTable
->
name
,
taosIpStr
(
*
(
int32_t
*
)
row
),
sdbVersion
,
pTable
->
id
);
return
0
;
}
else
{
switch
(
pTable
->
keyType
)
{
case
SDB_KEYTYPE_STRING
:
sdbError
(
"table:%s, failed to insert record:%s sdbVersion:%ld id:%d"
,
pTable
->
name
,
(
char
*
)
row
,
sdbVersion
,
pTable
->
id
);
break
;
case
SDB_KEYTYPE_UINT32
:
//dnodes or mnodes
sdbError
(
"table:%s, failed to insert record:%s sdbVersion:%ld id:%d"
,
pTable
->
name
,
taosIpStr
(
*
(
int32_t
*
)
row
),
sdbVersion
,
pTable
->
id
);
break
;
case
SDB_KEYTYPE_AUTO
:
sdbError
(
"table:%s, failed to insert record:%s sdbVersion:%ld id:%d"
,
pTable
->
name
,
*
(
int32_t
*
)
row
,
sdbVersion
,
pTable
->
id
);
break
;
default:
sdbError
(
"table:%s, failed to insert record:%s sdbVersion:%ld id:%d"
,
pTable
->
name
,
sdbVersion
,
pTable
->
id
);
break
;
}
return
-
1
;
}
}
total_size
=
sizeof
(
SRowHead
)
+
pTable
->
maxRowSize
+
sizeof
(
TSCKSUM
);
...
...
@@ -562,7 +587,24 @@ int sdbUpdateRow(void *handle, void *row, int updateSize, char isUpdated) {
if
(
pTable
==
NULL
||
row
==
NULL
)
return
-
1
;
pMeta
=
sdbGetRowMeta
(
handle
,
row
);
if
(
pMeta
==
NULL
)
{
sdbTrace
(
"table:%s, record is not there, update failed"
,
pTable
->
name
);
switch
(
pTable
->
keyType
)
{
case
SDB_KEYTYPE_STRING
:
sdbError
(
"table:%s, failed to update record:%s, record is not there, sdbVersion:%ld id:%d"
,
pTable
->
name
,
(
char
*
)
row
,
sdbVersion
,
pTable
->
id
);
break
;
case
SDB_KEYTYPE_UINT32
:
//dnodes or mnodes
sdbError
(
"table:%s, failed to update record:%s record is not there, sdbVersion:%ld id:%d"
,
pTable
->
name
,
taosIpStr
(
*
(
int32_t
*
)
row
),
sdbVersion
,
pTable
->
id
);
break
;
case
SDB_KEYTYPE_AUTO
:
sdbError
(
"table:%s, failed to update record:F%s record is not there, sdbVersion:%ld id:%d"
,
pTable
->
name
,
*
(
int32_t
*
)
row
,
sdbVersion
,
pTable
->
id
);
break
;
default:
sdbError
(
"table:%s, failed to update record:%s record is not there, sdbVersion:%ld id:%d"
,
pTable
->
name
,
sdbVersion
,
pTable
->
id
);
break
;
}
return
-
1
;
}
...
...
@@ -623,7 +665,7 @@ int sdbUpdateRow(void *handle, void *row, int updateSize, char isUpdated) {
pTable
->
name
,
(
char
*
)
row
,
sdbVersion
,
pTable
->
id
,
pTable
->
numOfRows
);
break
;
case
SDB_KEYTYPE_UINT32
:
//dnodes or mnodes
sdbTrace
(
"table:%s, a record is updated:%
d
, sdbVersion:%ld id:%ld numOfRows:%d"
,
sdbTrace
(
"table:%s, a record is updated:%
s
, sdbVersion:%ld id:%ld numOfRows:%d"
,
pTable
->
name
,
taosIpStr
(
*
(
int32_t
*
)
row
),
sdbVersion
,
pTable
->
id
,
pTable
->
numOfRows
);
break
;
case
SDB_KEYTYPE_AUTO
:
...
...
src/system/detail/src/mgmtMeter.c
浏览文件 @
7570c7ff
...
...
@@ -519,10 +519,8 @@ int mgmtCreateMeter(SDbObj *pDb, SCreateTableMsg *pCreate) {
pMeter
=
mgmtGetMeter
(
pCreate
->
meterId
);
if
(
pMeter
)
{
if
(
pCreate
->
igExists
)
{
mError
(
"table:%s, igExists is true"
,
pCreate
->
meterId
);
return
TSDB_CODE_SUCCESS
;
}
else
{
mError
(
"table:%s, table is already exist"
,
pCreate
->
meterId
);
return
TSDB_CODE_TABLE_ALREADY_EXIST
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录