Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
f27c1b12
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看板
提交
f27c1b12
编写于
1月 18, 2020
作者:
L
lihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TBASE-1490]
上级
32f8dca8
变更
12
显示空白变更内容
内联
并排
Showing
12 changed file
with
42 addition
and
42 deletion
+42
-42
src/client/src/tscServer.c
src/client/src/tscServer.c
+3
-3
src/client/src/tscStream.c
src/client/src/tscStream.c
+2
-2
src/modules/http/src/httpJson.c
src/modules/http/src/httpJson.c
+2
-2
src/modules/http/src/restJson.c
src/modules/http/src/restJson.c
+2
-2
src/rpc/src/trpc.c
src/rpc/src/trpc.c
+1
-1
src/rpc/src/tudp.c
src/rpc/src/tudp.c
+1
-1
src/sdb/src/sdbEngine.c
src/sdb/src/sdbEngine.c
+23
-23
src/system/detail/src/dnodeMgmt.c
src/system/detail/src/dnodeMgmt.c
+1
-1
src/system/detail/src/mgmtMeter.c
src/system/detail/src/mgmtMeter.c
+1
-1
src/util/src/tcache.c
src/util/src/tcache.c
+3
-3
src/util/src/thistogram.c
src/util/src/thistogram.c
+1
-1
src/util/src/tsocket.c
src/util/src/tsocket.c
+2
-2
未找到文件。
src/client/src/tscServer.c
浏览文件 @
f27c1b12
...
@@ -1492,7 +1492,7 @@ static char* doSerializeTableInfo(SSqlObj* pSql, int32_t numOfMeters, int32_t vn
...
@@ -1492,7 +1492,7 @@ static char* doSerializeTableInfo(SSqlObj* pSql, int32_t numOfMeters, int32_t vn
tscTrace
(
"%p vid:%d, query on %d meters"
,
pSql
,
htons
(
vnodeId
),
numOfMeters
);
tscTrace
(
"%p vid:%d, query on %d meters"
,
pSql
,
htons
(
vnodeId
),
numOfMeters
);
if
(
UTIL_METER_IS_NOMRAL_METER
(
pMeterMetaInfo
))
{
if
(
UTIL_METER_IS_NOMRAL_METER
(
pMeterMetaInfo
))
{
#ifdef _DEBUG_VIEW
#ifdef _DEBUG_VIEW
tscTrace
(
"%p sid:%d, uid:%
lld"
,
pSql
,
pMeterMetaInfo
->
pMeterMeta
->
sid
,
pMeterMetaInfo
->
pMeterMeta
->
uid
);
tscTrace
(
"%p sid:%d, uid:%
"
PRIu64
,
pSql
,
pMeterMetaInfo
->
pMeterMeta
->
sid
,
pMeterMetaInfo
->
pMeterMeta
->
uid
);
#endif
#endif
SMeterSidExtInfo
*
pMeterInfo
=
(
SMeterSidExtInfo
*
)
pMsg
;
SMeterSidExtInfo
*
pMeterInfo
=
(
SMeterSidExtInfo
*
)
pMsg
;
pMeterInfo
->
sid
=
htonl
(
pMeterMeta
->
sid
);
pMeterInfo
->
sid
=
htonl
(
pMeterMeta
->
sid
);
...
@@ -1515,7 +1515,7 @@ static char* doSerializeTableInfo(SSqlObj* pSql, int32_t numOfMeters, int32_t vn
...
@@ -1515,7 +1515,7 @@ static char* doSerializeTableInfo(SSqlObj* pSql, int32_t numOfMeters, int32_t vn
pMsg
+=
pMetricMeta
->
tagLen
;
pMsg
+=
pMetricMeta
->
tagLen
;
#ifdef _DEBUG_VIEW
#ifdef _DEBUG_VIEW
tscTrace
(
"%p sid:%d, uid:%
lld"
,
pSql
,
pQueryMeterInfo
->
sid
,
pQueryMeterInfo
->
uid
);
tscTrace
(
"%p sid:%d, uid:%
"
PRId64
,
pSql
,
pQueryMeterInfo
->
sid
,
pQueryMeterInfo
->
uid
);
#endif
#endif
}
}
}
}
...
@@ -1607,7 +1607,7 @@ int tscBuildQueryMsg(SSqlObj *pSql) {
...
@@ -1607,7 +1607,7 @@ int tscBuildQueryMsg(SSqlObj *pSql) {
pQueryMsg
->
nAggTimeInterval
=
htobe64
(
pCmd
->
nAggTimeInterval
);
pQueryMsg
->
nAggTimeInterval
=
htobe64
(
pCmd
->
nAggTimeInterval
);
pQueryMsg
->
intervalTimeUnit
=
pCmd
->
intervalTimeUnit
;
pQueryMsg
->
intervalTimeUnit
=
pCmd
->
intervalTimeUnit
;
if
(
pCmd
->
nAggTimeInterval
<
0
)
{
if
(
pCmd
->
nAggTimeInterval
<
0
)
{
tscError
(
"%p illegal value of aggregation time interval in query msg: %
ld"
,
pSql
,
pCmd
->
nAggTimeInterval
);
tscError
(
"%p illegal value of aggregation time interval in query msg: %
"
PRId64
,
pSql
,
pCmd
->
nAggTimeInterval
);
return
-
1
;
return
-
1
;
}
}
...
...
src/client/src/tscStream.c
浏览文件 @
f27c1b12
...
@@ -312,7 +312,7 @@ static void tscSetNextLaunchTimer(SSqlStream *pStream, SSqlObj *pSql) {
...
@@ -312,7 +312,7 @@ static void tscSetNextLaunchTimer(SSqlStream *pStream, SSqlObj *pSql) {
}
else
{
}
else
{
pStream
->
stime
+=
pStream
->
slidingTime
;
pStream
->
stime
+=
pStream
->
slidingTime
;
if
((
pStream
->
stime
-
pStream
->
interval
)
>=
pStream
->
etime
)
{
if
((
pStream
->
stime
-
pStream
->
interval
)
>=
pStream
->
etime
)
{
tscTrace
(
"%p stream:%p, stime:%
ld is larger than end time: %ld
, stop the stream"
,
pStream
->
pSql
,
pStream
,
tscTrace
(
"%p stream:%p, stime:%
"
PRId64
" is larger than end time: %"
PRId64
"
, stop the stream"
,
pStream
->
pSql
,
pStream
,
pStream
->
stime
,
pStream
->
etime
);
pStream
->
stime
,
pStream
->
etime
);
// TODO : How to terminate stream here
// TODO : How to terminate stream here
if
(
pStream
->
callback
)
{
if
(
pStream
->
callback
)
{
...
@@ -353,7 +353,7 @@ static void tscSetSlidingWindowInfo(SSqlObj *pSql, SSqlStream *pStream) {
...
@@ -353,7 +353,7 @@ static void tscSetSlidingWindowInfo(SSqlObj *pSql, SSqlStream *pStream) {
int64_t
minIntervalTime
=
int64_t
minIntervalTime
=
(
pStream
->
precision
==
TSDB_TIME_PRECISION_MICRO
)
?
tsMinIntervalTime
*
1000L
:
tsMinIntervalTime
;
(
pStream
->
precision
==
TSDB_TIME_PRECISION_MICRO
)
?
tsMinIntervalTime
*
1000L
:
tsMinIntervalTime
;
if
(
pCmd
->
nAggTimeInterval
<
minIntervalTime
)
{
if
(
pCmd
->
nAggTimeInterval
<
minIntervalTime
)
{
tscWarn
(
"%p stream:%p, original sample interval:%
ld too small, reset to:%"
PRId64
""
,
pSql
,
pStream
,
tscWarn
(
"%p stream:%p, original sample interval:%
"
PRId64
" too small, reset to:%"
PRId64
,
pSql
,
pStream
,
pCmd
->
nAggTimeInterval
,
minIntervalTime
);
pCmd
->
nAggTimeInterval
,
minIntervalTime
);
pCmd
->
nAggTimeInterval
=
minIntervalTime
;
pCmd
->
nAggTimeInterval
=
minIntervalTime
;
}
}
...
...
src/modules/http/src/httpJson.c
浏览文件 @
f27c1b12
...
@@ -119,7 +119,7 @@ int httpWriteJsonBufBody(JsonBuf* buf, bool isTheLast) {
...
@@ -119,7 +119,7 @@ int httpWriteJsonBufBody(JsonBuf* buf, bool isTheLast) {
return
0
;
// there is no data to dump.
return
0
;
// there is no data to dump.
}
else
{
}
else
{
int
len
=
sprintf
(
sLen
,
"%lx
\r\n
"
,
srcLen
);
int
len
=
sprintf
(
sLen
,
"%lx
\r\n
"
,
srcLen
);
httpTrace
(
"context:%p, fd:%d, ip:%s, write body, chunkSize:%
ld
, response:
\n
%s"
,
httpTrace
(
"context:%p, fd:%d, ip:%s, write body, chunkSize:%
"
PRIu64
"
, response:
\n
%s"
,
buf
->
pContext
,
buf
->
pContext
->
fd
,
buf
->
pContext
->
ipstr
,
srcLen
,
buf
->
buf
);
buf
->
pContext
,
buf
->
pContext
->
fd
,
buf
->
pContext
->
ipstr
,
srcLen
,
buf
->
buf
);
httpWriteBufNoTrace
(
buf
->
pContext
,
sLen
,
len
);
httpWriteBufNoTrace
(
buf
->
pContext
,
sLen
,
len
);
remain
=
httpWriteBufNoTrace
(
buf
->
pContext
,
buf
->
buf
,
(
int
)
srcLen
);
remain
=
httpWriteBufNoTrace
(
buf
->
pContext
,
buf
->
buf
,
(
int
)
srcLen
);
...
@@ -131,7 +131,7 @@ int httpWriteJsonBufBody(JsonBuf* buf, bool isTheLast) {
...
@@ -131,7 +131,7 @@ int httpWriteJsonBufBody(JsonBuf* buf, bool isTheLast) {
if
(
ret
==
0
)
{
if
(
ret
==
0
)
{
if
(
compressBufLen
>
0
)
{
if
(
compressBufLen
>
0
)
{
int
len
=
sprintf
(
sLen
,
"%x
\r\n
"
,
compressBufLen
);
int
len
=
sprintf
(
sLen
,
"%x
\r\n
"
,
compressBufLen
);
httpTrace
(
"context:%p, fd:%d, ip:%s, write body, chunkSize:%
ld
, compressSize:%d, last:%d, response:
\n
%s"
,
httpTrace
(
"context:%p, fd:%d, ip:%s, write body, chunkSize:%
"
PRIu64
"
, compressSize:%d, last:%d, response:
\n
%s"
,
buf
->
pContext
,
buf
->
pContext
->
fd
,
buf
->
pContext
->
ipstr
,
srcLen
,
compressBufLen
,
isTheLast
,
buf
->
buf
);
buf
->
pContext
,
buf
->
pContext
->
fd
,
buf
->
pContext
->
ipstr
,
srcLen
,
compressBufLen
,
isTheLast
,
buf
->
buf
);
httpWriteBufNoTrace
(
buf
->
pContext
,
sLen
,
len
);
httpWriteBufNoTrace
(
buf
->
pContext
,
sLen
,
len
);
remain
=
httpWriteBufNoTrace
(
buf
->
pContext
,
(
const
char
*
)
compressBuf
,
(
int
)
compressBufLen
);
remain
=
httpWriteBufNoTrace
(
buf
->
pContext
,
(
const
char
*
)
compressBuf
,
(
int
)
compressBufLen
);
...
...
src/modules/http/src/restJson.c
浏览文件 @
f27c1b12
...
@@ -152,7 +152,7 @@ bool restBuildSqlJson(HttpContext *pContext, HttpSqlCmd *cmd, TAOS_RES *result,
...
@@ -152,7 +152,7 @@ bool restBuildSqlJson(HttpContext *pContext, HttpSqlCmd *cmd, TAOS_RES *result,
}
}
if
(
cmd
->
numOfRows
>=
tsRestRowLimit
)
{
if
(
cmd
->
numOfRows
>=
tsRestRowLimit
)
{
httpTrace
(
"context:%p, fd:%d, ip:%s, user:%s, retrieve rows:%
ll
d larger than limit:%d, abort retrieve"
,
pContext
,
httpTrace
(
"context:%p, fd:%d, ip:%s, user:%s, retrieve rows:%d larger than limit:%d, abort retrieve"
,
pContext
,
pContext
->
fd
,
pContext
->
ipstr
,
pContext
->
user
,
cmd
->
numOfRows
,
tsRestRowLimit
);
pContext
->
fd
,
pContext
->
ipstr
,
pContext
->
user
,
cmd
->
numOfRows
,
tsRestRowLimit
);
return
false
;
return
false
;
}
}
...
@@ -163,7 +163,7 @@ bool restBuildSqlJson(HttpContext *pContext, HttpSqlCmd *cmd, TAOS_RES *result,
...
@@ -163,7 +163,7 @@ bool restBuildSqlJson(HttpContext *pContext, HttpSqlCmd *cmd, TAOS_RES *result,
return
false
;
return
false
;
}
}
else
{
else
{
httpTrace
(
"context:%p, fd:%d, ip:%s, user:%s, total rows:%
ll
d retrieved"
,
pContext
,
pContext
->
fd
,
pContext
->
ipstr
,
httpTrace
(
"context:%p, fd:%d, ip:%s, user:%s, total rows:%d retrieved"
,
pContext
,
pContext
->
fd
,
pContext
->
ipstr
,
pContext
->
user
,
cmd
->
numOfRows
);
pContext
->
user
,
cmd
->
numOfRows
);
return
true
;
return
true
;
}
}
...
...
src/rpc/src/trpc.c
浏览文件 @
f27c1b12
...
@@ -169,7 +169,7 @@ static int32_t taosCompressRpcMsg(char* pCont, int32_t contLen) {
...
@@ -169,7 +169,7 @@ static int32_t taosCompressRpcMsg(char* pCont, int32_t contLen) {
memcpy
(
pCont
+
overhead
,
buf
,
compLen
);
memcpy
(
pCont
+
overhead
,
buf
,
compLen
);
pHeader
->
comp
=
1
;
pHeader
->
comp
=
1
;
tTrace
(
"compress rpc msg, before:%
lld, after:%ll
d"
,
contLen
,
compLen
);
tTrace
(
"compress rpc msg, before:%
d, after:%
d"
,
contLen
,
compLen
);
finalLen
=
compLen
+
overhead
;
finalLen
=
compLen
+
overhead
;
//tDump(pCont, contLen);
//tDump(pCont, contLen);
...
...
src/rpc/src/tudp.c
浏览文件 @
f27c1b12
...
@@ -296,7 +296,7 @@ void *taosTransferDataViaTcp(void *argv) {
...
@@ -296,7 +296,7 @@ void *taosTransferDataViaTcp(void *argv) {
}
}
if
(
!
taosCheckHandleViaTcpValid
(
&
handleViaTcp
))
{
if
(
!
taosCheckHandleViaTcpValid
(
&
handleViaTcp
))
{
tError
(
"%s UDP server read handle via tcp invalid, handle:%
ld, hash:%ld"
,
pSet
->
label
,
handleViaTcp
.
handle
,
tError
(
"%s UDP server read handle via tcp invalid, handle:%
"
PRIu64
", hash:%"
PRIu64
,
pSet
->
label
,
handleViaTcp
.
handle
,
handleViaTcp
.
hash
);
handleViaTcp
.
hash
);
taosCloseSocket
(
connFd
);
taosCloseSocket
(
connFd
);
free
(
pTransfer
);
free
(
pTransfer
);
...
...
src/sdb/src/sdbEngine.c
浏览文件 @
f27c1b12
...
@@ -375,22 +375,22 @@ int64_t sdbInsertRow(void *handle, void *row, int rowSize) {
...
@@ -375,22 +375,22 @@ int64_t sdbInsertRow(void *handle, void *row, int rowSize) {
*/
*/
pTable
->
id
++
;
pTable
->
id
++
;
sdbVersion
++
;
sdbVersion
++
;
sdbPrint
(
"table:%s, record:%s already exist, think it successed, sdbVersion:%
ld id:%d"
,
sdbPrint
(
"table:%s, record:%s already exist, think it successed, sdbVersion:%
"
PRId64
" id:%"
PRId64
,
pTable
->
name
,
taosIpStr
(
*
(
int32_t
*
)
row
),
sdbVersion
,
pTable
->
id
);
pTable
->
name
,
taosIpStr
(
*
(
int32_t
*
)
row
),
sdbVersion
,
pTable
->
id
);
return
0
;
return
0
;
}
else
{
}
else
{
switch
(
pTable
->
keyType
)
{
switch
(
pTable
->
keyType
)
{
case
SDB_KEYTYPE_STRING
:
case
SDB_KEYTYPE_STRING
:
sdbError
(
"table:%s, failed to insert record:%s sdbVersion:%
ld id:%d"
,
pTable
->
name
,
(
char
*
)
row
,
sdbVersion
,
pTable
->
id
);
sdbError
(
"table:%s, failed to insert record:%s sdbVersion:%
"
PRId64
" id:%"
PRId64
,
pTable
->
name
,
(
char
*
)
row
,
sdbVersion
,
pTable
->
id
);
break
;
break
;
case
SDB_KEYTYPE_UINT32
:
//dnodes or mnodes
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
);
sdbError
(
"table:%s, failed to insert record:%s sdbVersion:%
"
PRId64
" id:%"
PRId64
,
pTable
->
name
,
taosIpStr
(
*
(
int32_t
*
)
row
),
sdbVersion
,
pTable
->
id
);
break
;
break
;
case
SDB_KEYTYPE_AUTO
:
case
SDB_KEYTYPE_AUTO
:
sdbError
(
"table:%s, failed to insert record:%d sdbVersion:%
ld id:%d"
,
pTable
->
name
,
*
(
int32_t
*
)
row
,
sdbVersion
,
pTable
->
id
);
sdbError
(
"table:%s, failed to insert record:%d sdbVersion:%
"
PRId64
" id:%"
PRId64
,
pTable
->
name
,
*
(
int32_t
*
)
row
,
sdbVersion
,
pTable
->
id
);
break
;
break
;
default:
default:
sdbError
(
"table:%s, failed to insert record sdbVersion:%
ld id:%d"
,
pTable
->
name
,
sdbVersion
,
pTable
->
id
);
sdbError
(
"table:%s, failed to insert record sdbVersion:%
"
PRId64
" id:%"
PRId64
,
pTable
->
name
,
sdbVersion
,
pTable
->
id
);
break
;
break
;
}
}
return
-
1
;
return
-
1
;
...
@@ -454,19 +454,19 @@ int64_t sdbInsertRow(void *handle, void *row, int rowSize) {
...
@@ -454,19 +454,19 @@ int64_t sdbInsertRow(void *handle, void *row, int rowSize) {
pTable
->
numOfRows
++
;
pTable
->
numOfRows
++
;
switch
(
pTable
->
keyType
)
{
switch
(
pTable
->
keyType
)
{
case
SDB_KEYTYPE_STRING
:
case
SDB_KEYTYPE_STRING
:
sdbTrace
(
"table:%s, a record is inserted:%s, sdbVersion:%
ld id:%ld rowSize:%d numOfRows:%d fileSize:%ld"
,
sdbTrace
(
"table:%s, a record is inserted:%s, sdbVersion:%
"
PRId64
" id:%"
PRId64
" rowSize:%d numOfRows:%d fileSize:%"
PRId64
,
pTable
->
name
,
(
char
*
)
row
,
sdbVersion
,
rowHead
->
id
,
rowHead
->
rowSize
,
pTable
->
numOfRows
,
pTable
->
size
);
pTable
->
name
,
(
char
*
)
row
,
sdbVersion
,
rowHead
->
id
,
rowHead
->
rowSize
,
pTable
->
numOfRows
,
pTable
->
size
);
break
;
break
;
case
SDB_KEYTYPE_UINT32
:
//dnodes or mnodes
case
SDB_KEYTYPE_UINT32
:
//dnodes or mnodes
sdbTrace
(
"table:%s, a record is inserted:%s, sdbVersion:%
ld id:%ld rowSize:%d numOfRows:%d fileSize:%ld"
,
sdbTrace
(
"table:%s, a record is inserted:%s, sdbVersion:%
"
PRId64
" id:%"
PRId64
" rowSize:%d numOfRows:%d fileSize:%"
PRId64
,
pTable
->
name
,
taosIpStr
(
*
(
int32_t
*
)
row
),
sdbVersion
,
rowHead
->
id
,
rowHead
->
rowSize
,
pTable
->
numOfRows
,
pTable
->
size
);
pTable
->
name
,
taosIpStr
(
*
(
int32_t
*
)
row
),
sdbVersion
,
rowHead
->
id
,
rowHead
->
rowSize
,
pTable
->
numOfRows
,
pTable
->
size
);
break
;
break
;
case
SDB_KEYTYPE_AUTO
:
case
SDB_KEYTYPE_AUTO
:
sdbTrace
(
"table:%s, a record is inserted:%d, sdbVersion:%
ld id:%ld rowSize:%d numOfRows:%d fileSize:%ld"
,
sdbTrace
(
"table:%s, a record is inserted:%d, sdbVersion:%
"
PRId64
" id:%"
PRId64
" rowSize:%d numOfRows:%d fileSize:%"
PRId64
,
pTable
->
name
,
*
(
int32_t
*
)
row
,
sdbVersion
,
rowHead
->
id
,
rowHead
->
rowSize
,
pTable
->
numOfRows
,
pTable
->
size
);
pTable
->
name
,
*
(
int32_t
*
)
row
,
sdbVersion
,
rowHead
->
id
,
rowHead
->
rowSize
,
pTable
->
numOfRows
,
pTable
->
size
);
break
;
break
;
default:
default:
sdbTrace
(
"table:%s, a record is inserted, sdbVersion:%
ld id:%ld rowSize:%d numOfRows:%d fileSize:%ld"
,
sdbTrace
(
"table:%s, a record is inserted, sdbVersion:%
"
PRId64
" id:%"
PRId64
" rowSize:%d numOfRows:%d fileSize:%"
PRId64
,
pTable
->
name
,
sdbVersion
,
rowHead
->
id
,
rowHead
->
rowSize
,
pTable
->
numOfRows
,
pTable
->
size
);
pTable
->
name
,
sdbVersion
,
rowHead
->
id
,
rowHead
->
rowSize
,
pTable
->
numOfRows
,
pTable
->
size
);
break
;
break
;
}
}
...
@@ -557,19 +557,19 @@ int sdbDeleteRow(void *handle, void *row) {
...
@@ -557,19 +557,19 @@ int sdbDeleteRow(void *handle, void *row) {
sdbAddIntoUpdateList
(
pTable
,
SDB_TYPE_DELETE
,
pMetaRow
);
sdbAddIntoUpdateList
(
pTable
,
SDB_TYPE_DELETE
,
pMetaRow
);
switch
(
pTable
->
keyType
)
{
switch
(
pTable
->
keyType
)
{
case
SDB_KEYTYPE_STRING
:
case
SDB_KEYTYPE_STRING
:
sdbTrace
(
"table:%s, a record is deleted:%s, sdbVersion:%
ld id:%ld
numOfRows:%d"
,
sdbTrace
(
"table:%s, a record is deleted:%s, sdbVersion:%
"
PRId64
" id:%"
PRId64
"
numOfRows:%d"
,
pTable
->
name
,
(
char
*
)
row
,
sdbVersion
,
pTable
->
id
,
pTable
->
numOfRows
);
pTable
->
name
,
(
char
*
)
row
,
sdbVersion
,
pTable
->
id
,
pTable
->
numOfRows
);
break
;
break
;
case
SDB_KEYTYPE_UINT32
:
//dnodes or mnodes
case
SDB_KEYTYPE_UINT32
:
//dnodes or mnodes
sdbTrace
(
"table:%s, a record is deleted:%s, sdbVersion:%
ld id:%ld
numOfRows:%d"
,
sdbTrace
(
"table:%s, a record is deleted:%s, sdbVersion:%
"
PRId64
" id:%"
PRId64
"
numOfRows:%d"
,
pTable
->
name
,
taosIpStr
(
*
(
int32_t
*
)
row
),
sdbVersion
,
pTable
->
id
,
pTable
->
numOfRows
);
pTable
->
name
,
taosIpStr
(
*
(
int32_t
*
)
row
),
sdbVersion
,
pTable
->
id
,
pTable
->
numOfRows
);
break
;
break
;
case
SDB_KEYTYPE_AUTO
:
case
SDB_KEYTYPE_AUTO
:
sdbTrace
(
"table:%s, a record is deleted:%d, sdbVersion:%
ld id:%ld
numOfRows:%d"
,
sdbTrace
(
"table:%s, a record is deleted:%d, sdbVersion:%
"
PRId64
" id:%"
PRId64
"
numOfRows:%d"
,
pTable
->
name
,
*
(
int32_t
*
)
row
,
sdbVersion
,
pTable
->
id
,
pTable
->
numOfRows
);
pTable
->
name
,
*
(
int32_t
*
)
row
,
sdbVersion
,
pTable
->
id
,
pTable
->
numOfRows
);
break
;
break
;
default:
default:
sdbTrace
(
"table:%s, a record is deleted, sdbVersion:%
ld id:%ld
numOfRows:%d"
,
sdbTrace
(
"table:%s, a record is deleted, sdbVersion:%
"
PRId64
" id:%"
PRId64
"
numOfRows:%d"
,
pTable
->
name
,
sdbVersion
,
pTable
->
id
,
pTable
->
numOfRows
);
pTable
->
name
,
sdbVersion
,
pTable
->
id
,
pTable
->
numOfRows
);
break
;
break
;
}
}
...
@@ -604,19 +604,19 @@ int sdbUpdateRow(void *handle, void *row, int updateSize, char isUpdated) {
...
@@ -604,19 +604,19 @@ int sdbUpdateRow(void *handle, void *row, int updateSize, char isUpdated) {
if
(
pMeta
==
NULL
)
{
if
(
pMeta
==
NULL
)
{
switch
(
pTable
->
keyType
)
{
switch
(
pTable
->
keyType
)
{
case
SDB_KEYTYPE_STRING
:
case
SDB_KEYTYPE_STRING
:
sdbError
(
"table:%s, failed to update record:%s, record is not there, sdbVersion:%
ld id:%d"
,
sdbError
(
"table:%s, failed to update record:%s, record is not there, sdbVersion:%
"
PRId64
" id:%"
PRId64
,
pTable
->
name
,
(
char
*
)
row
,
sdbVersion
,
pTable
->
id
);
pTable
->
name
,
(
char
*
)
row
,
sdbVersion
,
pTable
->
id
);
break
;
break
;
case
SDB_KEYTYPE_UINT32
:
//dnodes or mnodes
case
SDB_KEYTYPE_UINT32
:
//dnodes or mnodes
sdbError
(
"table:%s, failed to update record:%s, record is not there, sdbVersion:%
ld id:%d"
,
sdbError
(
"table:%s, failed to update record:%s, record is not there, sdbVersion:%
"
PRId64
" id:%"
PRId64
,
pTable
->
name
,
taosIpStr
(
*
(
int32_t
*
)
row
),
sdbVersion
,
pTable
->
id
);
pTable
->
name
,
taosIpStr
(
*
(
int32_t
*
)
row
),
sdbVersion
,
pTable
->
id
);
break
;
break
;
case
SDB_KEYTYPE_AUTO
:
case
SDB_KEYTYPE_AUTO
:
sdbError
(
"table:%s, failed to update record:%d, record is not there, sdbVersion:%
ld id:%d"
,
sdbError
(
"table:%s, failed to update record:%d, record is not there, sdbVersion:%
"
PRId64
" id:%"
PRId64
,
pTable
->
name
,
*
(
int32_t
*
)
row
,
sdbVersion
,
pTable
->
id
);
pTable
->
name
,
*
(
int32_t
*
)
row
,
sdbVersion
,
pTable
->
id
);
break
;
break
;
default:
default:
sdbError
(
"table:%s, failed to update record, record is not there, sdbVersion:%
ld id:%d"
,
sdbError
(
"table:%s, failed to update record, record is not there, sdbVersion:%
"
PRId64
" id:%"
PRId64
,
pTable
->
name
,
sdbVersion
,
pTable
->
id
);
pTable
->
name
,
sdbVersion
,
pTable
->
id
);
break
;
break
;
}
}
...
@@ -676,19 +676,19 @@ int sdbUpdateRow(void *handle, void *row, int updateSize, char isUpdated) {
...
@@ -676,19 +676,19 @@ int sdbUpdateRow(void *handle, void *row, int updateSize, char isUpdated) {
switch
(
pTable
->
keyType
)
{
switch
(
pTable
->
keyType
)
{
case
SDB_KEYTYPE_STRING
:
case
SDB_KEYTYPE_STRING
:
sdbTrace
(
"table:%s, a record is updated:%s, sdbVersion:%
ld id:%ld numOfRows:%d"
,
sdbTrace
(
"table:%s, a record is updated:%s, sdbVersion:%
"
PRId64
" id:%"
PRId64
" numOfRows:%"
PRId64
,
pTable
->
name
,
(
char
*
)
row
,
sdbVersion
,
pTable
->
id
,
pTable
->
numOfRows
);
pTable
->
name
,
(
char
*
)
row
,
sdbVersion
,
pTable
->
id
,
pTable
->
numOfRows
);
break
;
break
;
case
SDB_KEYTYPE_UINT32
:
//dnodes or mnodes
case
SDB_KEYTYPE_UINT32
:
//dnodes or mnodes
sdbTrace
(
"table:%s, a record is updated:%s, sdbVersion:%
ld id:%ld numOfRows:%d"
,
sdbTrace
(
"table:%s, a record is updated:%s, sdbVersion:%
"
PRId64
" id:%"
PRId64
" numOfRows:%"
PRId64
,
pTable
->
name
,
taosIpStr
(
*
(
int32_t
*
)
row
),
sdbVersion
,
pTable
->
id
,
pTable
->
numOfRows
);
pTable
->
name
,
taosIpStr
(
*
(
int32_t
*
)
row
),
sdbVersion
,
pTable
->
id
,
pTable
->
numOfRows
);
break
;
break
;
case
SDB_KEYTYPE_AUTO
:
case
SDB_KEYTYPE_AUTO
:
sdbTrace
(
"table:%s, a record is updated:%d, sdbVersion:%
ld id:%ld numOfRows:%d"
,
sdbTrace
(
"table:%s, a record is updated:%d, sdbVersion:%
"
PRId64
" id:%"
PRId64
" numOfRows:%"
PRId64
,
pTable
->
name
,
*
(
int32_t
*
)
row
,
sdbVersion
,
pTable
->
id
,
pTable
->
numOfRows
);
pTable
->
name
,
*
(
int32_t
*
)
row
,
sdbVersion
,
pTable
->
id
,
pTable
->
numOfRows
);
break
;
break
;
default:
default:
sdbTrace
(
"table:%s, a record is updated, sdbVersion:%
ld id:%ld numOfRows:%d"
,
pTable
->
name
,
sdbVersion
,
sdbTrace
(
"table:%s, a record is updated, sdbVersion:%
"
PRId64
" id:%"
PRId64
" numOfRows:%"
PRId64
,
pTable
->
name
,
sdbVersion
,
pTable
->
id
,
pTable
->
numOfRows
);
pTable
->
id
,
pTable
->
numOfRows
);
break
;
break
;
}
}
...
@@ -797,7 +797,7 @@ void sdbCloseTable(void *handle) {
...
@@ -797,7 +797,7 @@ void sdbCloseTable(void *handle) {
pthread_mutex_destroy
(
&
pTable
->
mutex
);
pthread_mutex_destroy
(
&
pTable
->
mutex
);
sdbNumOfTables
--
;
sdbNumOfTables
--
;
sdbTrace
(
"table:%s is closed, id:%
ld
numOfTables:%d"
,
pTable
->
name
,
pTable
->
id
,
sdbNumOfTables
);
sdbTrace
(
"table:%s is closed, id:%
"
PRId64
"
numOfTables:%d"
,
pTable
->
name
,
pTable
->
id
,
sdbNumOfTables
);
tfree
(
pTable
->
update
);
tfree
(
pTable
->
update
);
tfree
(
pTable
);
tfree
(
pTable
);
...
@@ -901,7 +901,7 @@ void sdbResetTable(SSdbTable *pTable) {
...
@@ -901,7 +901,7 @@ void sdbResetTable(SSdbTable *pTable) {
tfree
(
rowHead
);
tfree
(
rowHead
);
sdbPrint
(
"table:%s is updated, sdbVerion:%
ld id:%ld"
,
pTable
->
name
,
sdbVersion
,
pTable
->
id
);
sdbPrint
(
"table:%s is updated, sdbVerion:%
"
PRId64
" id:%"
PRId64
,
pTable
->
name
,
sdbVersion
,
pTable
->
id
);
}
}
// TODO:A problem here :use snapshot file to sync another node will cause
// TODO:A problem here :use snapshot file to sync another node will cause
...
...
src/system/detail/src/dnodeMgmt.c
浏览文件 @
f27c1b12
...
@@ -153,7 +153,7 @@ int vnodeProcessAlterStreamRequest(char *pMsg, int msgLen, SMgmtObj *pObj) {
...
@@ -153,7 +153,7 @@ int vnodeProcessAlterStreamRequest(char *pMsg, int msgLen, SMgmtObj *pObj) {
}
}
if
(
pAlter
->
sid
>=
pVnode
->
cfg
.
maxSessions
||
pAlter
->
sid
<
0
)
{
if
(
pAlter
->
sid
>=
pVnode
->
cfg
.
maxSessions
||
pAlter
->
sid
<
0
)
{
dError
(
"vid:%d sid:%d uid:%
ld
, sid is out of range"
,
pAlter
->
vnode
,
pAlter
->
sid
,
pAlter
->
uid
);
dError
(
"vid:%d sid:%d uid:%
"
PRIu64
"
, sid is out of range"
,
pAlter
->
vnode
,
pAlter
->
sid
,
pAlter
->
uid
);
code
=
TSDB_CODE_INVALID_TABLE_ID
;
code
=
TSDB_CODE_INVALID_TABLE_ID
;
goto
_over
;
goto
_over
;
}
}
...
...
src/system/detail/src/mgmtMeter.c
浏览文件 @
f27c1b12
...
@@ -688,7 +688,7 @@ int mgmtCreateMeter(SDbObj *pDb, SCreateTableMsg *pCreate) {
...
@@ -688,7 +688,7 @@ int mgmtCreateMeter(SDbObj *pDb, SCreateTableMsg *pCreate) {
pMeter
->
uid
=
(((
uint64_t
)
pMeter
->
gid
.
vgId
)
<<
40
)
+
((((
uint64_t
)
pMeter
->
gid
.
sid
)
&
((
1ul
<<
24
)
-
1ul
))
<<
16
)
+
pMeter
->
uid
=
(((
uint64_t
)
pMeter
->
gid
.
vgId
)
<<
40
)
+
((((
uint64_t
)
pMeter
->
gid
.
sid
)
&
((
1ul
<<
24
)
-
1ul
))
<<
16
)
+
((
uint64_t
)
sdbVersion
&
((
1ul
<<
16
)
-
1ul
));
((
uint64_t
)
sdbVersion
&
((
1ul
<<
16
)
-
1ul
));
mTrace
(
"table:%s, create table in vgroup, vgId:%d sid:%d vnode:%d uid:%
llu
db:%s"
,
mTrace
(
"table:%s, create table in vgroup, vgId:%d sid:%d vnode:%d uid:%
"
PRIu64
"
db:%s"
,
pMeter
->
meterId
,
pVgroup
->
vgId
,
sid
,
pVgroup
->
vnodeGid
[
0
].
vnode
,
pMeter
->
uid
,
pDb
->
name
);
pMeter
->
meterId
,
pVgroup
->
vgId
,
sid
,
pVgroup
->
vnodeGid
[
0
].
vnode
,
pMeter
->
uid
,
pDb
->
name
);
}
else
{
}
else
{
pMeter
->
uid
=
(((
uint64_t
)
pMeter
->
createdTime
)
<<
16
)
+
((
uint64_t
)
sdbVersion
&
((
1ul
<<
16
)
-
1ul
));
pMeter
->
uid
=
(((
uint64_t
)
pMeter
->
createdTime
)
<<
16
)
+
((
uint64_t
)
sdbVersion
&
((
1ul
<<
16
)
-
1ul
));
...
...
src/util/src/tcache.c
浏览文件 @
f27c1b12
...
@@ -587,8 +587,8 @@ void *taosAddDataIntoCache(void *handle, char *key, char *pData, int dataSize, i
...
@@ -587,8 +587,8 @@ void *taosAddDataIntoCache(void *handle, char *key, char *pData, int dataSize, i
pNode
=
taosAddToCacheImpl
(
pObj
,
key
,
keyLen
,
pData
,
dataSize
,
keepTime
*
1000L
);
pNode
=
taosAddToCacheImpl
(
pObj
,
key
,
keyLen
,
pData
,
dataSize
,
keepTime
*
1000L
);
if
(
NULL
!=
pNode
)
{
if
(
NULL
!=
pNode
)
{
pTrace
(
pTrace
(
"key:%s %p added into cache, slot:%d, addTime:%
lld, expireTime:%lld
, cache total:%d, "
"key:%s %p added into cache, slot:%d, addTime:%
"
PRIu64
", expireTime:%"
PRIu64
"
, cache total:%d, "
"size:%
lld
bytes, collision:%d"
,
"size:%
"
PRId64
"
bytes, collision:%d"
,
pNode
->
key
,
pNode
,
HASH_INDEX
(
pNode
->
hashVal
,
pObj
->
capacity
),
pNode
->
addTime
,
pNode
->
time
,
pObj
->
size
,
pNode
->
key
,
pNode
,
HASH_INDEX
(
pNode
->
hashVal
,
pObj
->
capacity
),
pNode
->
addTime
,
pNode
->
time
,
pObj
->
size
,
pObj
->
totalSize
,
pObj
->
statistics
.
numOfCollision
);
pObj
->
totalSize
,
pObj
->
statistics
.
numOfCollision
);
}
}
...
@@ -711,7 +711,7 @@ void *taosUpdateDataFromCache(void *handle, char *key, char *pData, int size, in
...
@@ -711,7 +711,7 @@ void *taosUpdateDataFromCache(void *handle, char *key, char *pData, int size, in
pObj
->
totalSize
);
pObj
->
totalSize
);
}
else
{
}
else
{
pNew
=
taosUpdateCacheImpl
(
pObj
,
pNode
,
key
,
keyLen
,
pData
,
size
,
duration
*
1000L
);
pNew
=
taosUpdateCacheImpl
(
pObj
,
pNode
,
key
,
keyLen
,
pData
,
size
,
duration
*
1000L
);
pTrace
(
"key:%s updated.expireTime:%
lld
.refCnt:%d"
,
key
,
pNode
->
time
,
pNode
->
refCount
);
pTrace
(
"key:%s updated.expireTime:%
"
PRIu64
"
.refCnt:%d"
,
key
,
pNode
->
time
,
pNode
->
refCount
);
}
}
__cache_unlock
(
pObj
);
__cache_unlock
(
pObj
);
...
...
src/util/src/thistogram.c
浏览文件 @
f27c1b12
...
@@ -453,7 +453,7 @@ void tHistogramPrint(SHistogramInfo* pHisto) {
...
@@ -453,7 +453,7 @@ void tHistogramPrint(SHistogramInfo* pHisto) {
for
(
int32_t
i
=
0
;
i
<
pHisto
->
numOfEntries
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
pHisto
->
numOfEntries
;
++
i
)
{
SHistBin
*
pEntry
=
(
SHistBin
*
)
pNode
->
pData
;
SHistBin
*
pEntry
=
(
SHistBin
*
)
pNode
->
pData
;
printf
(
"%d: (%f, %
lld
)
\n
"
,
i
+
1
,
pEntry
->
val
,
pEntry
->
num
);
printf
(
"%d: (%f, %
"
PRId64
"
)
\n
"
,
i
+
1
,
pEntry
->
val
,
pEntry
->
num
);
pNode
=
pNode
->
pForward
[
0
];
pNode
=
pNode
->
pForward
[
0
];
}
}
#endif
#endif
...
...
src/util/src/tsocket.c
浏览文件 @
f27c1b12
...
@@ -516,7 +516,7 @@ int taosCopyFds(int sfd, int dfd, int64_t len) {
...
@@ -516,7 +516,7 @@ int taosCopyFds(int sfd, int dfd, int64_t len) {
int
retLen
=
taosReadMsg
(
sfd
,
temp
,
(
int
)
readLen
);
int
retLen
=
taosReadMsg
(
sfd
,
temp
,
(
int
)
readLen
);
if
(
readLen
!=
retLen
)
{
if
(
readLen
!=
retLen
)
{
pError
(
"read error, readLen:%d retLen:%d len:%
ld leftLen:%ld
, reason:%s"
,
readLen
,
retLen
,
len
,
leftLen
,
pError
(
"read error, readLen:%d retLen:%d len:%
"
PRId64
" leftLen:%"
PRId64
"
, reason:%s"
,
readLen
,
retLen
,
len
,
leftLen
,
strerror
(
errno
));
strerror
(
errno
));
return
-
1
;
return
-
1
;
}
}
...
@@ -524,7 +524,7 @@ int taosCopyFds(int sfd, int dfd, int64_t len) {
...
@@ -524,7 +524,7 @@ int taosCopyFds(int sfd, int dfd, int64_t len) {
writeLen
=
taosWriteMsg
(
dfd
,
temp
,
readLen
);
writeLen
=
taosWriteMsg
(
dfd
,
temp
,
readLen
);
if
(
readLen
!=
writeLen
)
{
if
(
readLen
!=
writeLen
)
{
pError
(
"copy error, readLen:%d writeLen:%d len:%
ld leftLen:%ld
, reason:%s"
,
readLen
,
writeLen
,
len
,
leftLen
,
pError
(
"copy error, readLen:%d writeLen:%d len:%
"
PRId64
" leftLen:%"
PRId64
"
, reason:%s"
,
readLen
,
writeLen
,
len
,
leftLen
,
strerror
(
errno
));
strerror
(
errno
));
return
-
1
;
return
-
1
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录