Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
ea0cc2c5
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
ea0cc2c5
编写于
3月 21, 2023
作者:
H
Haojun Liao
提交者:
GitHub
3月 21, 2023
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #20554 from taosdata/fix/TS-2828
fix: add retry if insert error with meta change
上级
ca1dffff
b0fbb060
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
62 addition
and
25 deletion
+62
-25
examples/rust/wrapper.h
examples/rust/wrapper.h
+1
-0
source/client/inc/clientSml.h
source/client/inc/clientSml.h
+1
-1
source/client/src/clientEnv.c
source/client/src/clientEnv.c
+1
-1
source/client/src/clientSml.c
source/client/src/clientSml.c
+47
-12
source/client/src/clientSmlLine.c
source/client/src/clientSmlLine.c
+2
-0
source/common/src/tglobal.c
source/common/src/tglobal.c
+4
-4
source/dnode/vnode/src/tq/tq.c
source/dnode/vnode/src/tq/tq.c
+2
-2
source/dnode/vnode/src/tq/tqRead.c
source/dnode/vnode/src/tq/tqRead.c
+1
-2
source/libs/parser/src/parInsertSml.c
source/libs/parser/src/parInsertSml.c
+2
-2
source/util/src/tlog.c
source/util/src/tlog.c
+1
-1
未找到文件。
examples/rust/wrapper.h
0 → 100644
浏览文件 @
ea0cc2c5
#include<taos.h>
source/client/inc/clientSml.h
浏览文件 @
ea0cc2c5
...
...
@@ -70,7 +70,7 @@ extern "C" {
#define VALUE_LEN 6
#define OTD_JSON_FIELDS_NUM 4
#define MAX_RETRY_TIMES
5
#define MAX_RETRY_TIMES
100
typedef
TSDB_SML_PROTOCOL_TYPE
SMLProtocolType
;
typedef
enum
{
...
...
source/client/src/clientEnv.c
浏览文件 @
ea0cc2c5
...
...
@@ -543,7 +543,7 @@ void taos_init_imp(void) {
if
(
taosCreateLog
(
"taoslog"
,
10
,
configDir
,
NULL
,
NULL
,
NULL
,
NULL
,
1
)
!=
0
)
{
// ignore create log failed, only print
printf
(
" WARING: Create taoslog failed
. configDir=%s
\n
"
,
configDir
);
printf
(
" WARING: Create taoslog failed
:%s. configDir=%s
\n
"
,
strerror
(
errno
)
,
configDir
);
}
if
(
taosInitCfg
(
configDir
,
NULL
,
NULL
,
NULL
,
NULL
,
1
)
!=
0
)
{
...
...
source/client/src/clientSml.c
浏览文件 @
ea0cc2c5
...
...
@@ -750,6 +750,7 @@ end:
}
static
int32_t
smlModifyDBSchemas
(
SSmlHandle
*
info
)
{
uDebug
(
"SML:0x%"
PRIx64
" smlModifyDBSchemas start, format:%d, needModifySchema:%d"
,
info
->
id
,
info
->
dataFormat
,
info
->
needModifySchema
);
if
(
info
->
dataFormat
&&
!
info
->
needModifySchema
)
{
return
TSDB_CODE_SUCCESS
;
}
...
...
@@ -779,6 +780,7 @@ static int32_t smlModifyDBSchemas(SSmlHandle *info) {
code
=
catalogGetSTableMeta
(
info
->
pCatalog
,
&
conn
,
&
pName
,
&
pTableMeta
);
if
(
code
==
TSDB_CODE_PAR_TABLE_NOT_EXIST
||
code
==
TSDB_CODE_MND_STB_NOT_EXIST
)
{
uDebug
(
"SML:0x%"
PRIx64
" smlModifyDBSchemas create table:%s"
,
info
->
id
,
pName
.
tname
);
SArray
*
pColumns
=
taosArrayInit
(
taosArrayGetSize
(
sTableData
->
cols
),
sizeof
(
SField
));
SArray
*
pTags
=
taosArrayInit
(
taosArrayGetSize
(
sTableData
->
tags
),
sizeof
(
SField
));
code
=
smlBuildFieldsList
(
info
,
NULL
,
NULL
,
sTableData
->
tags
,
pTags
,
0
,
true
);
...
...
@@ -818,6 +820,7 @@ static int32_t smlModifyDBSchemas(SSmlHandle *info) {
goto
end
;
}
if
(
action
!=
SCHEMA_ACTION_NULL
)
{
uDebug
(
"SML:0x%"
PRIx64
" smlModifyDBSchemas change table tag, table:%s, action:%d"
,
info
->
id
,
pName
.
tname
,
action
);
SArray
*
pColumns
=
taosArrayInit
(
taosArrayGetSize
(
sTableData
->
cols
)
+
pTableMeta
->
tableInfo
.
numOfColumns
,
sizeof
(
SField
));
SArray
*
pTags
=
...
...
@@ -869,6 +872,7 @@ static int32_t smlModifyDBSchemas(SSmlHandle *info) {
goto
end
;
}
if
(
action
!=
SCHEMA_ACTION_NULL
)
{
uDebug
(
"SML:0x%"
PRIx64
" smlModifyDBSchemas change table col, table:%s, action:%d"
,
info
->
id
,
pName
.
tname
,
action
);
SArray
*
pColumns
=
taosArrayInit
(
taosArrayGetSize
(
sTableData
->
cols
)
+
pTableMeta
->
tableInfo
.
numOfColumns
,
sizeof
(
SField
));
SArray
*
pTags
=
...
...
@@ -935,15 +939,19 @@ static int32_t smlModifyDBSchemas(SSmlHandle *info) {
}
sTableData
->
tableMeta
=
pTableMeta
;
uDebug
(
"SML:0x%"
PRIx64
"modify schema uid:%"
PRIu64
", sversion:%d, tversion:%d"
,
info
->
id
,
pTableMeta
->
uid
,
pTableMeta
->
sversion
,
pTableMeta
->
tversion
)
tmp
=
(
SSmlSTableMeta
**
)
taosHashIterate
(
info
->
superTables
,
tmp
);
}
uDebug
(
"SML:0x%"
PRIx64
" smlModifyDBSchemas end success, format:%d, needModifySchema:%d"
,
info
->
id
,
info
->
dataFormat
,
info
->
needModifySchema
);
return
0
;
end:
taosHashCleanup
(
hashTmp
);
taosMemoryFreeClear
(
pTableMeta
);
// catalogRefreshTableMeta(info->pCatalog, &conn, &pName, 1);
catalogRefreshTableMeta
(
info
->
pCatalog
,
&
conn
,
&
pName
,
1
);
uError
(
"SML:0x%"
PRIx64
" smlModifyDBSchemas end failed:%d:%s, format:%d, needModifySchema:%d"
,
info
->
id
,
code
,
tstrerror
(
code
),
info
->
dataFormat
,
info
->
needModifySchema
);
return
code
;
}
...
...
@@ -1019,8 +1027,9 @@ static int32_t smlUpdateMeta(SHashObj *metaHash, SArray *metaArray, SArray *cols
}
else
{
size_t
tmp
=
taosArrayGetSize
(
metaArray
);
if
(
tmp
>
INT16_MAX
)
{
smlBuildInvalidDataMsg
(
msg
,
"too many cols or tags"
,
kv
->
key
);
uError
(
"too many cols or tags"
);
return
-
1
;
return
TSDB_CODE_SML_INVALID_DATA
;
}
int16_t
size
=
tmp
;
int
ret
=
taosHashPut
(
metaHash
,
kv
->
key
,
kv
->
keyLen
,
&
size
,
SHORT_BYTES
);
...
...
@@ -1170,6 +1179,7 @@ static int32_t smlPushCols(SArray *colsArray, SArray *cols) {
}
static
int32_t
smlParseLineBottom
(
SSmlHandle
*
info
)
{
uDebug
(
"SML:0x%"
PRIx64
" smlParseLineBottom start, format:%d, linenum:%d"
,
info
->
id
,
info
->
dataFormat
,
info
->
lineNum
);
if
(
info
->
dataFormat
)
return
TSDB_CODE_SUCCESS
;
for
(
int32_t
i
=
0
;
i
<
info
->
lineNum
;
i
++
)
{
...
...
@@ -1212,6 +1222,7 @@ static int32_t smlParseLineBottom(SSmlHandle *info) {
SSmlSTableMeta
**
tableMeta
=
(
SSmlSTableMeta
**
)
taosHashGet
(
info
->
superTables
,
elements
->
measure
,
elements
->
measureLen
);
if
(
tableMeta
)
{
// update meta
uDebug
(
"SML:0x%"
PRIx64
" smlParseLineBottom update meta, format:%d, linenum:%d"
,
info
->
id
,
info
->
dataFormat
,
info
->
lineNum
);
ret
=
smlUpdateMeta
((
*
tableMeta
)
->
colHash
,
(
*
tableMeta
)
->
cols
,
elements
->
colArray
,
false
,
&
info
->
msgBuf
);
if
(
ret
==
TSDB_CODE_SUCCESS
)
{
ret
=
smlUpdateMeta
((
*
tableMeta
)
->
tagHash
,
(
*
tableMeta
)
->
tags
,
tinfo
->
tags
,
true
,
&
info
->
msgBuf
);
...
...
@@ -1226,7 +1237,7 @@ static int32_t smlParseLineBottom(SSmlHandle *info) {
// uError("SML:0x%" PRIx64 " smlUpdateMeta failed", info->id);
// return ret;
// }
uDebug
(
"SML:0x%"
PRIx64
" smlParseLineBottom add meta, format:%d, linenum:%d"
,
info
->
id
,
info
->
dataFormat
,
info
->
lineNum
);
SSmlSTableMeta
*
meta
=
smlBuildSTableMeta
(
info
->
dataFormat
);
smlInsertMeta
(
meta
->
tagHash
,
meta
->
tags
,
tinfo
->
tags
);
if
(
terrno
==
TSDB_CODE_DUP_KEY
){
return
terrno
;}
...
...
@@ -1234,12 +1245,14 @@ static int32_t smlParseLineBottom(SSmlHandle *info) {
taosHashPut
(
info
->
superTables
,
elements
->
measure
,
elements
->
measureLen
,
&
meta
,
POINTER_BYTES
);
}
}
uDebug
(
"SML:0x%"
PRIx64
" smlParseLineBottom end, format:%d, linenum:%d"
,
info
->
id
,
info
->
dataFormat
,
info
->
lineNum
);
return
TSDB_CODE_SUCCESS
;
}
static
int32_t
smlInsertData
(
SSmlHandle
*
info
)
{
int32_t
code
=
TSDB_CODE_SUCCESS
;
uDebug
(
"SML:0x%"
PRIx64
" smlInsertData start, format:%d"
,
info
->
id
,
info
->
dataFormat
);
if
(
info
->
pRequest
->
dbList
==
NULL
){
info
->
pRequest
->
dbList
=
taosArrayInit
(
1
,
TSDB_DB_FNAME_LEN
);
...
...
@@ -1284,6 +1297,7 @@ static int32_t smlInsertData(SSmlHandle *info) {
// use tablemeta of stable to save vgid and uid of child table
(
*
pMeta
)
->
tableMeta
->
vgId
=
vg
.
vgId
;
(
*
pMeta
)
->
tableMeta
->
uid
=
tableData
->
uid
;
// one table merge data block together according uid
uDebug
(
"SML:0x%"
PRIx64
" smlInsertData table:%s, uid:%"
PRIu64
", format:%d"
,
info
->
id
,
pName
.
tname
,
tableData
->
uid
,
info
->
dataFormat
);
code
=
smlBindData
(
info
->
pQuery
,
info
->
dataFormat
,
tableData
->
tags
,
(
*
pMeta
)
->
cols
,
tableData
->
cols
,
(
*
pMeta
)
->
tableMeta
,
tableData
->
childTableName
,
tableData
->
sTableName
,
tableData
->
sTableNameLen
,
...
...
@@ -1306,16 +1320,18 @@ static int32_t smlInsertData(SSmlHandle *info) {
atomic_add_fetch_64
((
int64_t
*
)
&
pActivity
->
numOfInsertsReq
,
1
);
launchQueryImpl
(
info
->
pRequest
,
info
->
pQuery
,
true
,
NULL
);
uDebug
(
"SML:0x%"
PRIx64
" smlInsertData end, format:%d, code:%d,%s"
,
info
->
id
,
info
->
dataFormat
,
info
->
pRequest
->
code
,
tstrerror
(
info
->
pRequest
->
code
));
return
info
->
pRequest
->
code
;
}
static
void
smlPrintStatisticInfo
(
SSmlHandle
*
info
)
{
uDebug
(
"SML:0x%"
PRIx64
" smlInsertLines result, code:%d,lineNum:%d,stable num:%d,ctable num:%d,create stable num:%d,alter stable tag num:%d,alter stable col num:%d \
" smlInsertLines result, code:%d,
msg:%s,
lineNum:%d,stable num:%d,ctable num:%d,create stable num:%d,alter stable tag num:%d,alter stable col num:%d \
parse cost:%"
PRId64
",schema cost:%"
PRId64
",bind cost:%"
PRId64
",rpc cost:%"
PRId64
",total cost:%"
PRId64
""
,
info
->
id
,
info
->
cost
.
code
,
info
->
cost
.
lineNum
,
info
->
cost
.
numOfSTables
,
info
->
cost
.
numOfCTables
,
info
->
id
,
info
->
cost
.
code
,
tstrerror
(
info
->
cost
.
code
),
info
->
cost
.
lineNum
,
info
->
cost
.
numOfSTables
,
info
->
cost
.
numOfCTables
,
info
->
cost
.
numOfCreateSTables
,
info
->
cost
.
numOfAlterTagSTables
,
info
->
cost
.
numOfAlterColSTables
,
info
->
cost
.
schemaTime
-
info
->
cost
.
parseTime
,
info
->
cost
.
insertBindTime
-
info
->
cost
.
schemaTime
,
info
->
cost
.
insertRpcTime
-
info
->
cost
.
insertBindTime
,
info
->
cost
.
endTime
-
info
->
cost
.
insertRpcTime
,
...
...
@@ -1360,6 +1376,7 @@ int32_t smlClearForRerun(SSmlHandle *info) {
}
static
int32_t
smlParseLine
(
SSmlHandle
*
info
,
char
*
lines
[],
char
*
rawLine
,
char
*
rawLineEnd
,
int
numLines
)
{
uDebug
(
"SML:0x%"
PRIx64
" smlParseLine start"
,
info
->
id
);
int32_t
code
=
TSDB_CODE_SUCCESS
;
if
(
info
->
protocol
==
TSDB_SML_JSON_PROTOCOL
)
{
if
(
lines
)
{
...
...
@@ -1395,8 +1412,16 @@ static int32_t smlParseLine(SSmlHandle *info, char *lines[], char *rawLine, char
}
}
uDebug
(
"SML:0x%"
PRIx64
" smlParseLine israw:%d, len:%d, sql:%s"
,
info
->
id
,
info
->
isRawLine
,
len
,
(
info
->
isRawLine
?
"rawdata"
:
tmp
));
char
cTmp
=
0
;
// for print tmp if is raw
if
(
info
->
isRawLine
){
cTmp
=
tmp
[
len
-
1
];
tmp
[
len
-
1
]
=
'\0'
;
}
uDebug
(
"SML:0x%"
PRIx64
" smlParseLine israw:%d, numLines:%d, protocol:%d, len:%d, sql:%s"
,
info
->
id
,
info
->
isRawLine
,
numLines
,
info
->
protocol
,
len
,
tmp
);
if
(
info
->
isRawLine
){
tmp
[
len
-
1
]
=
cTmp
;
}
if
(
info
->
protocol
==
TSDB_SML_LINE_PROTOCOL
)
{
if
(
info
->
dataFormat
)
{
...
...
@@ -1421,6 +1446,7 @@ static int32_t smlParseLine(SSmlHandle *info, char *lines[], char *rawLine, char
return
code
;
}
if
(
info
->
reRun
)
{
uDebug
(
"SML:0x%"
PRIx64
" smlParseLine re run"
,
info
->
id
);
i
=
0
;
rawLine
=
oldRaw
;
code
=
smlClearForRerun
(
info
);
...
...
@@ -1431,6 +1457,7 @@ static int32_t smlParseLine(SSmlHandle *info, char *lines[], char *rawLine, char
}
i
++
;
}
uDebug
(
"SML:0x%"
PRIx64
" smlParseLine end"
,
info
->
id
);
return
code
;
}
...
...
@@ -1461,7 +1488,8 @@ static int smlProcess(SSmlHandle *info, char *lines[], char *rawLine, char *rawL
do
{
code
=
smlModifyDBSchemas
(
info
);
if
(
code
==
0
)
break
;
taosMsleep
(
200
);
taosMsleep
(
500
);
uInfo
(
"SML:0x%"
PRIx64
" smlModifyDBSchemas retry code:%s, times:%d"
,
info
->
id
,
tstrerror
(
code
),
retryNum
);
}
while
(
retryNum
++
<
taosHashGetSize
(
info
->
superTables
)
*
MAX_RETRY_TIMES
);
if
(
code
!=
0
)
{
...
...
@@ -1488,6 +1516,7 @@ TAOS_RES *taos_schemaless_insert_inner(TAOS *taos, char *lines[], char *rawLine,
}
SRequestObj
*
request
=
NULL
;
SSmlHandle
*
info
=
NULL
;
int
cnt
=
0
;
while
(
1
){
request
=
(
SRequestObj
*
)
createRequest
(
*
(
int64_t
*
)
taos
,
TSDB_SQL_INSERT
,
reqid
);
if
(
request
==
NULL
)
{
...
...
@@ -1542,16 +1571,22 @@ TAOS_RES *taos_schemaless_insert_inner(TAOS *taos, char *lines[], char *rawLine,
request
->
code
=
code
;
info
->
cost
.
endTime
=
taosGetTimestampUs
();
info
->
cost
.
code
=
code
;
smlPrintStatisticInfo
(
info
);
if
(
code
==
TSDB_CODE_TDB_INVALID_TABLE_SCHEMA_VER
||
code
==
TSDB_CODE_SDB_OBJ_CREATING
){
if
(
code
==
TSDB_CODE_TDB_INVALID_TABLE_SCHEMA_VER
||
code
==
TSDB_CODE_SDB_OBJ_CREATING
||
code
==
TSDB_CODE_PAR_VALUE_TOO_LONG
||
code
==
TSDB_CODE_MND_TRANS_CONFLICT
){
if
(
cnt
++
>=
10
){
uInfo
(
"SML:%"
PRIx64
" retry:%d/10 end code:%d, msg:%s"
,
info
->
id
,
cnt
,
code
,
tstrerror
(
code
));
break
;
}
taosMsleep
(
100
);
refreshMeta
(
request
->
pTscObj
,
request
);
uInfo
(
"SML:%"
PRIx64
"
ver is old retry or object is creating code:%d"
,
info
->
id
,
code
);
uInfo
(
"SML:%"
PRIx64
"
retry:%d/10,ver is old retry or object is creating code:%d, msg:%s"
,
info
->
id
,
cnt
,
code
,
tstrerror
(
code
)
);
smlDestroyInfo
(
info
);
info
=
NULL
;
taos_free_result
(
request
);
request
=
NULL
;
continue
;
}
smlPrintStatisticInfo
(
info
);
break
;
}
...
...
source/client/src/clientSmlLine.c
浏览文件 @
ea0cc2c5
...
...
@@ -583,12 +583,14 @@ int32_t smlParseInfluxString(SSmlHandle *info, char *sql, char *sqlEnd, SSmlLine
.
i
=
ts
,
.
length
=
(
size_t
)
tDataTypes
[
TSDB_DATA_TYPE_TIMESTAMP
].
bytes
};
if
(
info
->
dataFormat
)
{
uDebug
(
"SML:0x%"
PRIx64
" smlParseInfluxString format true, ts:%"
PRId64
,
info
->
id
,
ts
);
ret
=
smlBuildCol
(
info
->
currTableDataCtx
,
info
->
currSTableMeta
->
schema
,
&
kv
,
0
);
if
(
ret
!=
TSDB_CODE_SUCCESS
){
return
ret
;}
ret
=
smlBuildRow
(
info
->
currTableDataCtx
);
if
(
ret
!=
TSDB_CODE_SUCCESS
){
return
ret
;}
clearColValArray
(
info
->
currTableDataCtx
->
pValues
);
}
else
{
uDebug
(
"SML:0x%"
PRIx64
" smlParseInfluxString format false, ts:%"
PRId64
,
info
->
id
,
ts
);
taosArraySet
(
elements
->
colArray
,
0
,
&
kv
);
}
info
->
preLine
=
*
elements
;
...
...
source/common/src/tglobal.c
浏览文件 @
ea0cc2c5
...
...
@@ -1238,13 +1238,13 @@ int32_t taosCreateLog(const char *logname, int32_t logFileNum, const char *cfgDi
}
if
(
taosLoadCfg
(
pCfg
,
envCmd
,
cfgDir
,
envFile
,
apolloUrl
)
!=
0
)
{
uError
(
"failed to load cfg since %s"
,
terrstr
());
printf
(
"failed to load cfg since %s"
,
terrstr
());
cfgCleanup
(
pCfg
);
return
-
1
;
}
if
(
cfgLoadFromArray
(
pCfg
,
pArgs
)
!=
0
)
{
uError
(
"failed to load cfg from array since %s"
,
terrstr
());
printf
(
"failed to load cfg from array since %s"
,
terrstr
());
cfgCleanup
(
pCfg
);
return
-
1
;
}
...
...
@@ -1260,13 +1260,13 @@ int32_t taosCreateLog(const char *logname, int32_t logFileNum, const char *cfgDi
if
(
taosMulModeMkDir
(
tsLogDir
,
0777
)
!=
0
)
{
terrno
=
TAOS_SYSTEM_ERROR
(
errno
);
uError
(
"failed to create dir:%s since %s"
,
tsLogDir
,
terrstr
());
printf
(
"failed to create dir:%s since %s"
,
tsLogDir
,
terrstr
());
cfgCleanup
(
pCfg
);
return
-
1
;
}
if
(
taosInitLog
(
logname
,
logFileNum
)
!=
0
)
{
uError
(
"failed to init log file since %s"
,
terrstr
());
printf
(
"failed to init log file since %s"
,
terrstr
());
cfgCleanup
(
pCfg
);
return
-
1
;
}
...
...
source/dnode/vnode/src/tq/tq.c
浏览文件 @
ea0cc2c5
...
...
@@ -637,9 +637,9 @@ static int32_t extractDataForMq(STQ* pTq, STqHandle* pHandle, const SMqPollReq*
if
(
metaRsp
.
metaRspLen
>
0
)
{
code
=
tqSendMetaPollRsp
(
pTq
,
pMsg
,
pRequest
,
&
metaRsp
);
tqDebug
(
"tmq poll: consumer:0x%"
PRIx64
" subkey:%s vgId:%d, send meta offset type:%d,uid:%"
PRId64
",
version
:%"
PRId64
,
",
ts
:%"
PRId64
,
consumerId
,
pHandle
->
subKey
,
vgId
,
metaRsp
.
rspOffset
.
type
,
metaRsp
.
rspOffset
.
uid
,
metaRsp
.
rspOffset
.
version
);
metaRsp
.
rspOffset
.
ts
);
taosMemoryFree
(
metaRsp
.
metaRsp
);
tDeleteSTaosxRsp
(
&
taosxRsp
);
return
code
;
...
...
source/dnode/vnode/src/tq/tqRead.c
浏览文件 @
ea0cc2c5
...
...
@@ -185,13 +185,12 @@ end:
int32_t
tqFetchLog
(
STQ
*
pTq
,
STqHandle
*
pHandle
,
int64_t
*
fetchOffset
,
SWalCkHead
**
ppCkHead
)
{
int32_t
code
=
0
;
taosThreadMutexLock
(
&
pHandle
->
pWalReader
->
mutex
);
int64_t
offset
=
*
fetchOffset
;
while
(
1
)
{
if
(
walFetchHead
(
pHandle
->
pWalReader
,
offset
,
*
ppCkHead
)
<
0
)
{
tqDebug
(
"tmq poll: consumer:
0x
%"
PRIx64
", (epoch %d) vgId:%d offset %"
PRId64
", no more log to return"
,
tqDebug
(
"tmq poll: consumer:%"
PRIx64
", (epoch %d) vgId:%d offset %"
PRId64
", no more log to return"
,
pHandle
->
consumerId
,
pHandle
->
epoch
,
TD_VID
(
pTq
->
pVnode
),
offset
);
*
fetchOffset
=
offset
-
1
;
code
=
-
1
;
...
...
source/libs/parser/src/parInsertSml.c
浏览文件 @
ea0cc2c5
...
...
@@ -70,7 +70,7 @@ static int32_t smlBoundColumnData(SArray* cols, SBoundColInfo* pBoundInfo, SSche
SToken
sToken
=
{.
n
=
kv
->
keyLen
,
.
z
=
(
char
*
)
kv
->
key
};
col_id_t
t
=
lastColIdx
+
1
;
col_id_t
index
=
((
t
==
0
&&
!
isTag
)
?
0
:
insFindCol
(
&
sToken
,
t
,
pBoundInfo
->
numOfCols
,
pSchema
));
u
Debug
(
"SML, index:%d, t:%d, ncols:%d"
,
index
,
t
,
pBoundInfo
->
numOfCols
);
u
Trace
(
"SML, index:%d, t:%d, ncols:%d"
,
index
,
t
,
pBoundInfo
->
numOfCols
);
if
(
index
<
0
&&
t
>
0
)
{
index
=
insFindCol
(
&
sToken
,
0
,
t
,
pSchema
);
}
...
...
@@ -345,7 +345,7 @@ int32_t smlBindData(SQuery* query, bool dataFormat, SArray* tags, SArray* colsSc
}
if
(
!
taosMbsToUcs4
(
kv
->
value
,
kv
->
length
,
(
TdUcs4
*
)
pUcs4
,
pColSchema
->
bytes
-
VARSTR_HEADER_SIZE
,
&
len
))
{
if
(
errno
==
E2BIG
)
{
uError
(
"sml bind taosMbsToUcs4 error, kv length:%d, bytes:%d
"
,
(
int
)
kv
->
length
,
pColSchema
->
bytes
);
uError
(
"sml bind taosMbsToUcs4 error, kv length:%d, bytes:%d
, kv->value:%s"
,
(
int
)
kv
->
length
,
pColSchema
->
bytes
,
kv
->
value
);
buildInvalidOperationMsg
(
&
pBuf
,
"value too long"
);
ret
=
TSDB_CODE_PAR_VALUE_TOO_LONG
;
goto
end
;
...
...
source/util/src/tlog.c
浏览文件 @
ea0cc2c5
...
...
@@ -21,7 +21,7 @@
#include "tjson.h"
#include "tglobal.h"
#define LOG_MAX_LINE_SIZE (1024)
#define LOG_MAX_LINE_SIZE (10
0
24)
#define LOG_MAX_LINE_BUFFER_SIZE (LOG_MAX_LINE_SIZE + 3)
#define LOG_MAX_LINE_DUMP_SIZE (1024 * 1024)
#define LOG_MAX_LINE_DUMP_BUFFER_SIZE (LOG_MAX_LINE_DUMP_SIZE + 3)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录