Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
a510bfbf
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看板
未验证
提交
a510bfbf
编写于
12月 10, 2019
作者:
H
haojun Liao
提交者:
GitHub
12月 10, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #884 from taosdata/feature/slguan
Remove compiler warning options
上级
1a930db5
5cfd2145
变更
32
隐藏空白更改
内联
并排
Showing
32 changed file
with
73 addition
and
106 deletion
+73
-106
src/client/src/tscFunctionImpl.c
src/client/src/tscFunctionImpl.c
+0
-2
src/client/src/tscParseInsert.c
src/client/src/tscParseInsert.c
+0
-3
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+0
-2
src/inc/tutil.h
src/inc/tutil.h
+4
-2
src/kit/taosdemo/taosdemo.c
src/kit/taosdemo/taosdemo.c
+0
-2
src/modules/http/src/httpServer.c
src/modules/http/src/httpServer.c
+3
-3
src/modules/http/src/tgHandle.c
src/modules/http/src/tgHandle.c
+2
-2
src/rpc/src/trpc.c
src/rpc/src/trpc.c
+2
-6
src/system/detail/inc/mgmt.h
src/system/detail/inc/mgmt.h
+1
-1
src/system/detail/src/dnodeSystem.c
src/system/detail/src/dnodeSystem.c
+0
-5
src/system/detail/src/mgmtDb.c
src/system/detail/src/mgmtDb.c
+2
-2
src/system/detail/src/mgmtDnode.c
src/system/detail/src/mgmtDnode.c
+0
-1
src/system/detail/src/mgmtMeter.c
src/system/detail/src/mgmtMeter.c
+2
-2
src/system/detail/src/mgmtShell.c
src/system/detail/src/mgmtShell.c
+8
-15
src/system/detail/src/mgmtSupertableQuery.c
src/system/detail/src/mgmtSupertableQuery.c
+11
-2
src/system/detail/src/mgmtUser.c
src/system/detail/src/mgmtUser.c
+2
-2
src/system/detail/src/mgmtVgroup.c
src/system/detail/src/mgmtVgroup.c
+2
-2
src/system/detail/src/vnodeFile.c
src/system/detail/src/vnodeFile.c
+9
-10
src/system/detail/src/vnodeImport.c
src/system/detail/src/vnodeImport.c
+3
-3
src/system/detail/src/vnodeMeter.c
src/system/detail/src/vnodeMeter.c
+4
-6
src/system/detail/src/vnodeQueryImpl.c
src/system/detail/src/vnodeQueryImpl.c
+4
-2
src/system/detail/src/vnodeRead.c
src/system/detail/src/vnodeRead.c
+5
-7
src/system/detail/src/vnodeShell.c
src/system/detail/src/vnodeShell.c
+2
-3
src/system/detail/src/vnodeStore.c
src/system/detail/src/vnodeStore.c
+0
-6
src/system/detail/src/vnodeUtil.c
src/system/detail/src/vnodeUtil.c
+0
-2
src/system/lite/src/dnodeMgmt.spec.c
src/system/lite/src/dnodeMgmt.spec.c
+2
-2
src/system/lite/src/mgmtBalance.spec.c
src/system/lite/src/mgmtBalance.spec.c
+1
-1
src/system/lite/src/mgmtDnodeInt.spec.c
src/system/lite/src/mgmtDnodeInt.spec.c
+2
-2
src/system/lite/src/vnodeFile.spec.c
src/system/lite/src/vnodeFile.spec.c
+1
-1
src/util/src/tcrc32c.c
src/util/src/tcrc32c.c
+0
-2
src/util/src/textbuffer.c
src/util/src/textbuffer.c
+0
-2
src/util/src/tsocket.c
src/util/src/tsocket.c
+1
-3
未找到文件。
src/client/src/tscFunctionImpl.c
浏览文件 @
a510bfbf
...
...
@@ -13,8 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
#include "os.h"
#include "taosmsg.h"
#include "tast.h"
...
...
src/client/src/tscParseInsert.c
浏览文件 @
a510bfbf
...
...
@@ -18,9 +18,6 @@
#define _XOPEN_SOURCE
#pragma GCC diagnostic ignored "-Woverflow"
#pragma GCC diagnostic ignored "-Wunused-variable"
#include "os.h"
#include "ihash.h"
#include "tscSecondaryMerge.h"
...
...
src/client/src/tscSQLParser.c
浏览文件 @
a510bfbf
...
...
@@ -28,8 +28,6 @@
#include "tsclient.h"
#include "tscSQLParser.h"
#pragma GCC diagnostic ignored "-Wunused-variable"
#define DEFAULT_PRIMARY_TIMESTAMP_COL_NAME "_c0"
// -1 is tbname column index, so here use the -2 as the initial value
...
...
src/inc/tutil.h
浏览文件 @
a510bfbf
...
...
@@ -37,8 +37,8 @@ extern "C" {
#define tfree(x) \
{ \
if (x) { \
free(
x
); \
x =
NULL
; \
free(
(void*)(x)
); \
x =
0
; \
} \
}
...
...
@@ -189,6 +189,8 @@ static FORCE_INLINE void taosEncryptPass(uint8_t *inBuf, unsigned int inLen, cha
char
*
taosIpStr
(
uint32_t
ipInt
);
uint32_t
ip2uint
(
const
char
*
const
ip_addr
);
#define TAOS_ALLOC_MODE_DEFAULT 0
#define TAOS_ALLOC_MODE_RANDOM_FAIL 1
#define TAOS_ALLOC_MODE_DETECT_LEAK 2
...
...
src/kit/taosdemo/taosdemo.c
浏览文件 @
a510bfbf
...
...
@@ -33,8 +33,6 @@
extern
char
configDir
[];
#pragma GCC diagnostic ignored "-Wmissing-braces"
#define BUFFER_SIZE 65536
#define MAX_DB_NAME_SIZE 64
#define MAX_TB_NAME_SIZE 64
...
...
src/modules/http/src/httpServer.c
浏览文件 @
a510bfbf
...
...
@@ -106,7 +106,7 @@ void httpCleanUpContextTimer(HttpContext *pContext) {
}
}
void
httpCleanUpContext
(
HttpContext
*
pContext
)
{
void
httpCleanUpContext
(
HttpContext
*
pContext
,
void
*
unused
)
{
httpTrace
(
"context:%p, start the clean up operation, sig:%p"
,
pContext
,
pContext
->
signature
);
void
*
sig
=
atomic_val_compare_exchange_ptr
(
&
pContext
->
signature
,
pContext
,
0
);
if
(
sig
==
NULL
)
{
...
...
@@ -184,7 +184,7 @@ bool httpInitContext(HttpContext *pContext) {
void
httpCloseContext
(
HttpThread
*
pThread
,
HttpContext
*
pContext
)
{
taosTmrReset
(
httpCleanUpContext
,
HTTP_DELAY_CLOSE_TIME_MS
,
pContext
,
pThread
->
pServer
->
timerHandle
,
&
pContext
->
timer
);
taosTmrReset
(
(
TAOS_TMR_CALLBACK
)
httpCleanUpContext
,
HTTP_DELAY_CLOSE_TIME_MS
,
pContext
,
pThread
->
pServer
->
timerHandle
,
&
pContext
->
timer
);
httpTrace
(
"context:%p, fd:%d, ip:%s, state:%s will be closed after:%d ms, timer:%p"
,
pContext
,
pContext
->
fd
,
pContext
->
ipstr
,
httpContextStateStr
(
pContext
->
state
),
HTTP_DELAY_CLOSE_TIME_MS
,
pContext
->
timer
);
}
...
...
@@ -273,7 +273,7 @@ void httpCleanUpConnect(HttpServer *pServer) {
taosCloseSocket
(
pThread
->
pollFd
);
while
(
pThread
->
pHead
)
{
httpCleanUpContext
(
pThread
->
pHead
);
httpCleanUpContext
(
pThread
->
pHead
,
0
);
}
pthread_cancel
(
pThread
->
thread
);
...
...
src/modules/http/src/tgHandle.c
浏览文件 @
a510bfbf
...
...
@@ -215,7 +215,7 @@ ParseEnd:
}
}
int
tgParseSchema
(
char
*
content
,
char
*
fileName
)
{
int
tgParseSchema
(
c
onst
c
har
*
content
,
char
*
fileName
)
{
cJSON
*
root
=
cJSON_Parse
(
content
);
if
(
root
==
NULL
)
{
httpError
(
"failed to parse telegraf schema file:%s, invalid json format, content:%s"
,
fileName
,
content
);
...
...
@@ -248,7 +248,7 @@ int tgParseSchema(char *content, char*fileName) {
return
size
;
}
int
tgReadSchema
(
c
onst
c
har
*
fileName
)
{
int
tgReadSchema
(
char
*
fileName
)
{
FILE
*
fp
=
fopen
(
fileName
,
"r"
);
if
(
fp
==
NULL
)
{
return
-
1
;
...
...
src/rpc/src/trpc.c
浏览文件 @
a510bfbf
...
...
@@ -246,9 +246,7 @@ char *taosBuildReqHeader(void *param, char type, char *msg) {
pHeader
->
destId
=
pConn
->
peerId
;
pHeader
->
port
=
0
;
#pragma GCC diagnostic ignored "-Wpointer-to-int-cast"
pHeader
->
uid
=
(
uint32_t
)
pConn
+
(
uint32_t
)
getpid
();
#pragma GCC diagnostic warning "-Wpointer-to-int-cast"
pHeader
->
uid
=
(
uint32_t
)((
int64_t
)
pConn
+
(
int64_t
)
getpid
());
memcpy
(
pHeader
->
meterId
,
pConn
->
meterId
,
tListLen
(
pHeader
->
meterId
));
...
...
@@ -280,9 +278,7 @@ char *taosBuildReqMsgWithSize(void *param, char type, int size) {
pHeader
->
sourceId
=
pConn
->
ownId
;
pHeader
->
destId
=
pConn
->
peerId
;
#pragma GCC diagnostic ignored "-Wpointer-to-int-cast"
pHeader
->
uid
=
(
uint32_t
)
pConn
+
(
uint32_t
)
getpid
();
#pragma GCC diagnostic warning "-Wpointer-to-int-cast"
pHeader
->
uid
=
(
uint32_t
)((
int64_t
)
pConn
+
(
int64_t
)
getpid
());
memcpy
(
pHeader
->
meterId
,
pConn
->
meterId
,
tListLen
(
pHeader
->
meterId
));
...
...
src/system/detail/inc/mgmt.h
浏览文件 @
a510bfbf
...
...
@@ -419,7 +419,7 @@ void mgmtCleanupBalance();
int
mgmtAllocVnodes
(
SVgObj
*
pVgroup
);
void
mgmtSetDnodeShellRemoving
(
SDnodeObj
*
pDnode
);
void
mgmtSetDnodeUnRemove
(
SDnodeObj
*
pDnode
);
void
mgmtStartBalanceTimer
(
int
mseconds
);
void
mgmtStartBalanceTimer
(
int
64_t
mseconds
);
void
mgmtSetDnodeOfflineOnSdbChanged
();
void
mgmtUpdateVgroupState
(
SVgObj
*
pVgroup
,
int
lbStatus
,
int
srcIp
);
bool
mgmtAddVnode
(
SVgObj
*
pVgroup
,
SDnodeObj
*
pSrcDnode
,
SDnodeObj
*
pDestDnode
);
...
...
src/system/detail/src/dnodeSystem.c
浏览文件 @
a510bfbf
...
...
@@ -26,9 +26,6 @@
#include "tglobalcfg.h"
#include "vnode.h"
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Woverflow"
SModule
tsModule
[
TSDB_MOD_MAX
]
=
{
0
};
uint32_t
tsModuleStatus
=
0
;
pthread_mutex_t
dmutex
;
...
...
@@ -219,5 +216,3 @@ void dnodeCountRequest(SCountInfo *info) {
info
->
selectReqNum
=
atomic_exchange_32
(
&
vnodeSelectReqNum
,
0
);
info
->
insertReqNum
=
atomic_exchange_32
(
&
vnodeInsertReqNum
,
0
);
}
#pragma GCC diagnostic pop
\ No newline at end of file
src/system/detail/src/mgmtDb.c
浏览文件 @
a510bfbf
...
...
@@ -54,8 +54,8 @@ void mgmtDbActionInit() {
}
void
*
mgmtDbAction
(
char
action
,
void
*
row
,
char
*
str
,
int
size
,
int
*
ssize
)
{
if
(
mgmtDbActionFp
[
action
]
!=
NULL
)
{
return
(
*
(
mgmtDbActionFp
[
action
]))(
row
,
str
,
size
,
ssize
);
if
(
mgmtDbActionFp
[
(
uint8_t
)
action
]
!=
NULL
)
{
return
(
*
(
mgmtDbActionFp
[
(
uint8_t
)
action
]))(
row
,
str
,
size
,
ssize
);
}
return
NULL
;
}
...
...
src/system/detail/src/mgmtDnode.c
浏览文件 @
a510bfbf
...
...
@@ -461,7 +461,6 @@ int mgmtRetrieveVnodes(SShowObj *pShow, char *data, int rows, SConnObj *pConn) {
SDnodeObj
*
pDnode
=
NULL
;
char
*
pWrite
;
int
cols
=
0
;
char
ipstr
[
20
];
if
(
0
==
rows
)
return
0
;
...
...
src/system/detail/src/mgmtMeter.c
浏览文件 @
a510bfbf
...
...
@@ -418,8 +418,8 @@ void *mgmtMeterActionAfterBatchUpdate(void *row, char *str, int size, int *ssize
}
void
*
mgmtMeterAction
(
char
action
,
void
*
row
,
char
*
str
,
int
size
,
int
*
ssize
)
{
if
(
mgmtMeterActionFp
[
action
]
!=
NULL
)
{
return
(
*
(
mgmtMeterActionFp
[
action
]))(
row
,
str
,
size
,
ssize
);
if
(
mgmtMeterActionFp
[
(
uint8_t
)
action
]
!=
NULL
)
{
return
(
*
(
mgmtMeterActionFp
[
(
uint8_t
)
action
]))(
row
,
str
,
size
,
ssize
);
}
return
NULL
;
}
...
...
src/system/detail/src/mgmtShell.c
浏览文件 @
a510bfbf
...
...
@@ -23,12 +23,6 @@
#include "tlog.h"
#include "tstatus.h"
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Woverflow"
#pragma GCC diagnostic ignored "-Wpointer-sign"
#pragma GCC diagnostic ignored "-Wint-conversion"
#define MAX_LEN_OF_METER_META (sizeof(SMultiMeterMeta) + sizeof(SSchema) * TSDB_MAX_COLUMNS + sizeof(SSchema) * TSDB_MAX_TAGS + TSDB_MAX_TAGS_LEN)
void
*
pShellConn
=
NULL
;
...
...
@@ -695,7 +689,7 @@ int mgmtProcessAlterUserMsg(char *pMsg, int msgLen, SConnObj *pConn) {
(
strcmp
(
pConn
->
pUser
->
user
,
"root"
)
==
0
))
{
if
((
pAlter
->
flag
&
TSDB_ALTER_USER_PASSWD
)
!=
0
)
{
memset
(
pUser
->
pass
,
0
,
sizeof
(
pUser
->
pass
));
taosEncryptPass
(
pAlter
->
pass
,
strlen
(
pAlter
->
pass
),
pUser
->
pass
);
taosEncryptPass
(
(
uint8_t
*
)
pAlter
->
pass
,
strlen
(
pAlter
->
pass
),
pUser
->
pass
);
}
if
((
pAlter
->
flag
&
TSDB_ALTER_USER_PRIVILEGES
)
!=
0
)
{
if
(
pAlter
->
privilege
==
1
)
{
// super
...
...
@@ -840,11 +834,11 @@ int mgmtProcessShowMsg(char *pMsg, int msgLen, SConnObj *pConn) {
pShowRsp
->
qhandle
=
(
uint64_t
)
pShow
;
// qhandle;
pConn
->
qhandle
=
pShowRsp
->
qhandle
;
code
=
(
*
mgmtGetMetaFp
[
pShowMsg
->
type
])(
&
pShowRsp
->
meterMeta
,
pShow
,
pConn
);
code
=
(
*
mgmtGetMetaFp
[
(
uint8_t
)
pShowMsg
->
type
])(
&
pShowRsp
->
meterMeta
,
pShow
,
pConn
);
if
(
code
==
0
)
{
pMsg
+=
sizeof
(
SShowRspMsg
)
+
sizeof
(
SSchema
)
*
pShow
->
numOfColumns
;
}
else
{
mError
(
"pShow:%p, type:%d %s, failed to get Meta, code:%d"
,
pShow
,
pShowMsg
->
type
,
taosMsg
[
pShowMsg
->
type
],
code
);
mError
(
"pShow:%p, type:%d %s, failed to get Meta, code:%d"
,
pShow
,
pShowMsg
->
type
,
taosMsg
[
(
uint8_t
)
pShowMsg
->
type
],
code
);
free
(
pShow
);
}
}
...
...
@@ -915,7 +909,7 @@ int mgmtProcessRetrieveMsg(char *pMsg, int msgLen, SConnObj *pConn) {
// if free flag is set, client wants to clean the resources
if
((
pRetrieve
->
free
&
TSDB_QUERY_TYPE_FREE_RESOURCE
)
!=
TSDB_QUERY_TYPE_FREE_RESOURCE
)
rowsRead
=
(
*
mgmtRetrieveFp
[
pShow
->
type
])(
pShow
,
pRsp
->
data
,
rowsToRead
,
pConn
);
rowsRead
=
(
*
mgmtRetrieveFp
[
(
uint8_t
)
pShow
->
type
])(
pShow
,
pRsp
->
data
,
rowsToRead
,
pConn
);
if
(
rowsRead
<
0
)
{
rowsRead
=
0
;
...
...
@@ -931,7 +925,7 @@ int mgmtProcessRetrieveMsg(char *pMsg, int msgLen, SConnObj *pConn) {
taosSendMsgToPeer
(
pConn
->
thandle
,
pStart
,
msgLen
);
if
(
rowsToRead
==
0
)
{
uintptr_t
oldSign
=
atomic_val_compare_exchange_ptr
(
&
pShow
->
signature
,
pShow
,
0
);
uintptr_t
oldSign
=
(
uintptr_t
)
atomic_val_compare_exchange_ptr
(
&
pShow
->
signature
,
pShow
,
0
);
if
(
oldSign
!=
(
uintptr_t
)
pShow
)
{
return
msgLen
;
}
...
...
@@ -1139,8 +1133,9 @@ void mgmtEstablishConn(SConnObj *pConn) {
}
}
uint32_t
temp
;
taosGetRpcConnInfo
(
pConn
->
thandle
,
&
temp
,
&
pConn
->
ip
,
&
pConn
->
port
,
&
temp
,
&
temp
);
int32_t
tempint32
;
uint32_t
tempuint32
;
taosGetRpcConnInfo
(
pConn
->
thandle
,
&
tempuint32
,
&
pConn
->
ip
,
&
pConn
->
port
,
&
tempint32
,
&
tempint32
);
mgmtAddConnIntoAcct
(
pConn
);
}
...
...
@@ -1368,5 +1363,3 @@ void mgmtInitProcessShellMsg() {
mgmtProcessShellMsg
[
TSDB_MSG_TYPE_KILL_STREAM
]
=
mgmtProcessKillStreamMsg
;
mgmtProcessShellMsg
[
TSDB_MSG_TYPE_KILL_CONNECTION
]
=
mgmtProcessKillConnectionMsg
;
}
#pragma GCC diagnostic pop
src/system/detail/src/mgmtSupertableQuery.c
浏览文件 @
a510bfbf
...
...
@@ -203,7 +203,7 @@ static bool mgmtTablenameFilterCallback(tSkipListNode* pNode, void* param) {
static
void
mgmtRetrieveFromLikeOptr
(
tQueryResultset
*
pRes
,
const
char
*
str
,
STabObj
*
pMetric
)
{
SPatternCompareInfo
info
=
PATTERN_COMPARE_INFO_INITIALIZER
;
SMeterNameFilterSupporter
supporter
=
{
info
,
str
};
SMeterNameFilterSupporter
supporter
=
{
info
,
(
char
*
)
str
};
pRes
->
num
=
tSkipListIterateList
(
pMetric
->
pSkipList
,
(
tSkipListNode
***
)
&
pRes
->
pRes
,
mgmtTablenameFilterCallback
,
&
supporter
);
...
...
@@ -230,6 +230,12 @@ static void mgmtFilterByTableNameCond(tQueryResultset* pRes, char* condStr, int3
free
(
str
);
}
/*
*-Wunused-function"
*/
#if 0
static bool mgmtJoinFilterCallback(tSkipListNode* pNode, void* param) {
SJoinSupporter* pSupporter = (SJoinSupporter*)param;
...
...
@@ -259,6 +265,7 @@ static bool mgmtJoinFilterCallback(tSkipListNode* pNode, void* param) {
return false;
}
#endif
static
void
orderResult
(
SMetricMetaMsg
*
pMetricMetaMsg
,
tQueryResultset
*
pRes
,
int16_t
colIndex
,
int32_t
tableIndex
)
{
SMetricMetaElemMsg
*
pElem
=
(
SMetricMetaElemMsg
*
)((
char
*
)
pMetricMetaMsg
+
pMetricMetaMsg
->
metaElem
[
tableIndex
]);
...
...
@@ -691,7 +698,9 @@ static int32_t mgmtFilterMeterByIndex(STabObj* pMetric, tQueryResultset* pRes, c
return
TSDB_CODE_OPS_NOT_SUPPORT
;
}
else
{
// query according to the binary expression
SSyntaxTreeFilterSupporter
s
=
{.
pTagSchema
=
pTagSchema
,
.
numOfTags
=
pMetric
->
numOfTags
};
SBinaryFilterSupp
supp
=
{.
fp
=
tSkipListNodeFilterCallback
,
.
setupInfoFn
=
filterPrepare
,
.
pExtInfo
=
&
s
};
SBinaryFilterSupp
supp
=
{.
fp
=
(
__result_filter_fn_t
)
tSkipListNodeFilterCallback
,
.
setupInfoFn
=
(
__do_filter_suppl_fn_t
)
filterPrepare
,
.
pExtInfo
=
&
s
};
tSQLBinaryExprTraverse
(
pExpr
,
pMetric
->
pSkipList
,
pRes
,
&
supp
);
tSQLBinaryExprDestroy
(
&
pExpr
,
tSQLListTraverseDestroyInfo
);
...
...
src/system/detail/src/mgmtUser.c
浏览文件 @
a510bfbf
...
...
@@ -54,8 +54,8 @@ void mgmtUserActionInit() {
}
void
*
mgmtUserAction
(
char
action
,
void
*
row
,
char
*
str
,
int
size
,
int
*
ssize
)
{
if
(
mgmtUserActionFp
[
action
]
!=
NULL
)
{
return
(
*
(
mgmtUserActionFp
[
action
]))(
row
,
str
,
size
,
ssize
);
if
(
mgmtUserActionFp
[
(
uint8_t
)
action
]
!=
NULL
)
{
return
(
*
(
mgmtUserActionFp
[
(
uint8_t
)
action
]))(
row
,
str
,
size
,
ssize
);
}
return
NULL
;
}
...
...
src/system/detail/src/mgmtVgroup.c
浏览文件 @
a510bfbf
...
...
@@ -55,8 +55,8 @@ void mgmtVgroupActionInit() {
}
void
*
mgmtVgroupAction
(
char
action
,
void
*
row
,
char
*
str
,
int
size
,
int
*
ssize
)
{
if
(
mgmtVgroupActionFp
[
action
]
!=
NULL
)
{
return
(
*
(
mgmtVgroupActionFp
[
action
]))(
row
,
str
,
size
,
ssize
);
if
(
mgmtVgroupActionFp
[
(
uint8_t
)
action
]
!=
NULL
)
{
return
(
*
(
mgmtVgroupActionFp
[
(
uint8_t
)
action
]))(
row
,
str
,
size
,
ssize
);
}
return
NULL
;
}
...
...
src/system/detail/src/vnodeFile.c
浏览文件 @
a510bfbf
...
...
@@ -187,13 +187,13 @@ int vnodeCreateNeccessaryFiles(SVnodeObj *pVnode) {
if
(
pVnode
->
lastKeyOnFile
==
0
)
{
if
(
pCfg
->
daysPerFile
==
0
)
pCfg
->
daysPerFile
=
10
;
pVnode
->
fileId
=
pVnode
->
firstKey
/
tsMsPerDay
[
pVnode
->
cfg
.
precision
]
/
pCfg
->
daysPerFile
;
pVnode
->
lastKeyOnFile
=
(
int64_t
)(
pVnode
->
fileId
+
1
)
*
pCfg
->
daysPerFile
*
tsMsPerDay
[
pVnode
->
cfg
.
precision
]
-
1
;
pVnode
->
fileId
=
pVnode
->
firstKey
/
tsMsPerDay
[
(
uint8_t
)
pVnode
->
cfg
.
precision
]
/
pCfg
->
daysPerFile
;
pVnode
->
lastKeyOnFile
=
(
int64_t
)(
pVnode
->
fileId
+
1
)
*
pCfg
->
daysPerFile
*
tsMsPerDay
[
(
uint8_t
)
pVnode
->
cfg
.
precision
]
-
1
;
pVnode
->
numOfFiles
=
1
;
if
(
vnodeCreateEmptyCompFile
(
vnode
,
pVnode
->
fileId
)
<
0
)
return
-
1
;
}
numOfFiles
=
(
pVnode
->
lastKeyOnFile
-
pVnode
->
commitFirstKey
)
/
tsMsPerDay
[
pVnode
->
cfg
.
precision
]
/
pCfg
->
daysPerFile
;
numOfFiles
=
(
pVnode
->
lastKeyOnFile
-
pVnode
->
commitFirstKey
)
/
tsMsPerDay
[
(
uint8_t
)
pVnode
->
cfg
.
precision
]
/
pCfg
->
daysPerFile
;
if
(
pVnode
->
commitFirstKey
>
pVnode
->
lastKeyOnFile
)
numOfFiles
=
-
1
;
dTrace
(
"vid:%d, commitFirstKey:%ld lastKeyOnFile:%ld numOfFiles:%d fileId:%d vnodeNumOfFiles:%d"
,
pVnode
->
vnode
,
...
...
@@ -221,15 +221,15 @@ int vnodeCreateNeccessaryFiles(SVnodeObj *pVnode) {
#else
return
-
1
;
#endif
pVnode
->
lastKeyOnFile
+=
(
int64_t
)
tsMsPerDay
[
pVnode
->
cfg
.
precision
]
*
pCfg
->
daysPerFile
;
pVnode
->
lastKeyOnFile
+=
(
int64_t
)
tsMsPerDay
[
(
uint8_t
)
pVnode
->
cfg
.
precision
]
*
pCfg
->
daysPerFile
;
filesAdded
=
1
;
numOfFiles
=
0
;
// hacker way
}
fileId
=
pVnode
->
fileId
-
numOfFiles
;
pVnode
->
commitLastKey
=
pVnode
->
lastKeyOnFile
-
(
int64_t
)
numOfFiles
*
tsMsPerDay
[
pVnode
->
cfg
.
precision
]
*
pCfg
->
daysPerFile
;
pVnode
->
commitFirstKey
=
pVnode
->
commitLastKey
-
(
int64_t
)
tsMsPerDay
[
pVnode
->
cfg
.
precision
]
*
pCfg
->
daysPerFile
+
1
;
pVnode
->
lastKeyOnFile
-
(
int64_t
)
numOfFiles
*
tsMsPerDay
[
(
uint8_t
)
pVnode
->
cfg
.
precision
]
*
pCfg
->
daysPerFile
;
pVnode
->
commitFirstKey
=
pVnode
->
commitLastKey
-
(
int64_t
)
tsMsPerDay
[
(
uint8_t
)
pVnode
->
cfg
.
precision
]
*
pCfg
->
daysPerFile
+
1
;
pVnode
->
commitFileId
=
fileId
;
pVnode
->
numOfFiles
=
pVnode
->
numOfFiles
+
filesAdded
;
...
...
@@ -244,8 +244,7 @@ int vnodeOpenCommitFiles(SVnodeObj *pVnode, int noTempLast) {
int
len
=
0
;
struct
stat
filestat
;
int
vnode
=
pVnode
->
vnode
;
int
fileId
,
numOfFiles
,
filesAdded
=
0
;
SVnodeCfg
*
pCfg
=
&
pVnode
->
cfg
;
int
fileId
;
if
(
vnodeCreateNeccessaryFiles
(
pVnode
)
<
0
)
return
-
1
;
...
...
@@ -1246,7 +1245,7 @@ int vnodeWriteBlockToFile(SMeterObj *pObj, SCompBlock *pCompBlock, SData *data[]
// assert(data[i]->len == points*pObj->schema[i].bytes);
if
(
pCfg
->
compression
)
{
cdata
[
i
]
->
len
=
(
*
pCompFunc
[
pObj
->
schema
[
i
].
type
])(
data
[
i
]
->
data
,
points
*
pObj
->
schema
[
i
].
bytes
,
points
,
cdata
[
i
]
->
len
=
(
*
pCompFunc
[
(
uint8_t
)
pObj
->
schema
[
i
].
type
])(
data
[
i
]
->
data
,
points
*
pObj
->
schema
[
i
].
bytes
,
points
,
cdata
[
i
]
->
data
,
pObj
->
schema
[
i
].
bytes
*
pObj
->
pointsPerFileBlock
+
EXTRA_BYTES
,
pCfg
->
compression
,
buffer
,
bufferSize
);
fields
[
i
].
len
=
cdata
[
i
]
->
len
;
...
...
@@ -1338,7 +1337,7 @@ int vnodeSearchPointInFile(SMeterObj *pObj, SQuery *pQuery) {
if
(
pVnode
->
numOfFiles
<=
0
)
return
0
;
SVnodeCfg
*
pCfg
=
&
pVnode
->
cfg
;
delta
=
(
int64_t
)
pCfg
->
daysPerFile
*
tsMsPerDay
[
pVnode
->
cfg
.
precision
];
delta
=
(
int64_t
)
pCfg
->
daysPerFile
*
tsMsPerDay
[
(
uint8_t
)
pVnode
->
cfg
.
precision
];
latest
=
pObj
->
lastKeyOnFile
;
oldest
=
(
pVnode
->
fileId
-
pVnode
->
numOfFiles
+
1
)
*
delta
;
...
...
src/system/detail/src/vnodeImport.c
浏览文件 @
a510bfbf
...
...
@@ -146,7 +146,7 @@ int vnodeFindKeyInCache(SImportInfo *pImport, int order) {
void
vnodeGetValidDataRange
(
int
vnode
,
TSKEY
now
,
TSKEY
*
minKey
,
TSKEY
*
maxKey
)
{
SVnodeObj
*
pVnode
=
vnodeList
+
vnode
;
int64_t
delta
=
pVnode
->
cfg
.
daysPerFile
*
tsMsPerDay
[
pVnode
->
cfg
.
precision
];
int64_t
delta
=
pVnode
->
cfg
.
daysPerFile
*
tsMsPerDay
[
(
uint8_t
)
pVnode
->
cfg
.
precision
];
int
fid
=
now
/
delta
;
*
minKey
=
(
fid
-
pVnode
->
maxFiles
+
1
)
*
delta
;
*
maxKey
=
(
fid
+
2
)
*
delta
-
1
;
...
...
@@ -682,7 +682,7 @@ static int vnodeMergeDataIntoFile(SImportInfo *pImport, const char *payload, int
SCacheInfo
*
pInfo
=
(
SCacheInfo
*
)(
pObj
->
pCache
);
TSKEY
lastKeyImported
=
0
;
TSKEY
delta
=
pVnode
->
cfg
.
daysPerFile
*
tsMsPerDay
[
pVnode
->
cfg
.
precision
];
TSKEY
delta
=
pVnode
->
cfg
.
daysPerFile
*
tsMsPerDay
[
(
uint8_t
)
pVnode
->
cfg
.
precision
];
TSKEY
minFileKey
=
fid
*
delta
;
TSKEY
maxFileKey
=
minFileKey
+
delta
-
1
;
TSKEY
firstKey
=
KEY_AT_INDEX
(
payload
,
pObj
->
bytesPerPoint
,
0
);
...
...
@@ -1499,7 +1499,7 @@ int vnodeImportDataToFiles(SImportInfo *pImport, char *payload, const int rows)
SMeterObj
*
pObj
=
(
SMeterObj
*
)(
pImport
->
pObj
);
SVnodeObj
*
pVnode
=
vnodeList
+
pObj
->
vnode
;
int64_t
delta
=
pVnode
->
cfg
.
daysPerFile
*
tsMsPerDay
[
pVnode
->
cfg
.
precision
];
int64_t
delta
=
pVnode
->
cfg
.
daysPerFile
*
tsMsPerDay
[
(
uint8_t
)
pVnode
->
cfg
.
precision
];
int
sfid
=
KEY_AT_INDEX
(
payload
,
pObj
->
bytesPerPoint
,
0
)
/
delta
;
int
efid
=
KEY_AT_INDEX
(
payload
,
pObj
->
bytesPerPoint
,
rows
-
1
)
/
delta
;
...
...
src/system/detail/src/vnodeMeter.c
浏览文件 @
a510bfbf
...
...
@@ -26,8 +26,6 @@
#include "vnodeUtil.h"
#include "tstatus.h"
#pragma GCC diagnostic ignored "-Wpointer-sign"
#define VALID_TIMESTAMP(key, curKey, prec) (((key) >= 0) && ((key) <= ((curKey) + 36500 * tsMsPerDay[prec])))
int
tsMeterSizeOnFile
;
...
...
@@ -604,10 +602,10 @@ int vnodeInsertPoints(SMeterObj *pObj, char *cont, int contLen, char source, voi
TSKEY
firstKey
=
*
((
TSKEY
*
)
pData
);
TSKEY
lastKey
=
*
((
TSKEY
*
)(
pData
+
pObj
->
bytesPerPoint
*
(
numOfPoints
-
1
)));
int
cfid
=
now
/
pVnode
->
cfg
.
daysPerFile
/
tsMsPerDay
[
pVnode
->
cfg
.
precision
];
int
cfid
=
now
/
pVnode
->
cfg
.
daysPerFile
/
tsMsPerDay
[
(
uint8_t
)
pVnode
->
cfg
.
precision
];
TSKEY
minAllowedKey
=
(
cfid
-
pVnode
->
maxFiles
+
1
)
*
pVnode
->
cfg
.
daysPerFile
*
tsMsPerDay
[
pVnode
->
cfg
.
precision
];
TSKEY
maxAllowedKey
=
(
cfid
+
2
)
*
pVnode
->
cfg
.
daysPerFile
*
tsMsPerDay
[
pVnode
->
cfg
.
precision
]
-
2
;
TSKEY
minAllowedKey
=
(
cfid
-
pVnode
->
maxFiles
+
1
)
*
pVnode
->
cfg
.
daysPerFile
*
tsMsPerDay
[
(
uint8_t
)
pVnode
->
cfg
.
precision
];
TSKEY
maxAllowedKey
=
(
cfid
+
2
)
*
pVnode
->
cfg
.
daysPerFile
*
tsMsPerDay
[
(
uint8_t
)
pVnode
->
cfg
.
precision
]
-
2
;
if
(
firstKey
<
minAllowedKey
||
firstKey
>
maxAllowedKey
||
lastKey
<
minAllowedKey
||
lastKey
>
maxAllowedKey
)
{
dError
(
"vid:%d sid:%d id:%s, vnode lastKeyOnFile:%lld, data is out of range, numOfPoints:%d firstKey:%lld lastKey:%lld minAllowedKey:%lld maxAllowedKey:%lld"
,
pObj
->
vnode
,
pObj
->
sid
,
pObj
->
meterId
,
pVnode
->
lastKeyOnFile
,
numOfPoints
,
firstKey
,
lastKey
,
minAllowedKey
,
maxAllowedKey
);
...
...
@@ -634,7 +632,7 @@ int vnodeInsertPoints(SMeterObj *pObj, char *cont, int contLen, char source, voi
continue
;
}
if
(
!
VALID_TIMESTAMP
(
*
((
TSKEY
*
)
pData
),
tsKey
,
pVnode
->
cfg
.
precision
))
{
if
(
!
VALID_TIMESTAMP
(
*
((
TSKEY
*
)
pData
),
tsKey
,
(
uint8_t
)
pVnode
->
cfg
.
precision
))
{
code
=
TSDB_CODE_TIMESTAMP_OUT_OF_RANGE
;
break
;
}
...
...
src/system/detail/src/vnodeQueryImpl.c
浏览文件 @
a510bfbf
...
...
@@ -1055,7 +1055,7 @@ static void *getGenericDataBlock(SMeterObj *pMeterObj, SQuery *pQuery, int32_t s
static
int32_t
getFileIdFromKey
(
int32_t
vid
,
TSKEY
key
)
{
SVnodeObj
*
pVnode
=
&
vnodeList
[
vid
];
int64_t
delta
=
(
int64_t
)
pVnode
->
cfg
.
daysPerFile
*
tsMsPerDay
[
pVnode
->
cfg
.
precision
];
int64_t
delta
=
(
int64_t
)
pVnode
->
cfg
.
daysPerFile
*
tsMsPerDay
[
(
uint8_t
)
pVnode
->
cfg
.
precision
];
return
(
int32_t
)(
key
/
delta
);
// set the starting fileId
}
...
...
@@ -2227,7 +2227,7 @@ static void teardownQueryRuntimeEnv(SQueryRuntimeEnv *pRuntimeEnv) {
// get maximum time interval in each file
static
int64_t
getOldestKey
(
int32_t
numOfFiles
,
int64_t
fileId
,
SVnodeCfg
*
pCfg
)
{
int64_t
duration
=
pCfg
->
daysPerFile
*
tsMsPerDay
[
pCfg
->
precision
];
int64_t
duration
=
pCfg
->
daysPerFile
*
tsMsPerDay
[
(
uint8_t
)
pCfg
->
precision
];
return
(
fileId
-
numOfFiles
+
1
)
*
duration
;
}
...
...
@@ -6331,6 +6331,8 @@ int32_t setIntervalQueryExecutionContext(SMeterQuerySupportObj *pSupporter, int3
tsBufSetCursor
(
pSupporter
->
runtimeEnv
.
pTSBuf
,
&
pMeterQueryInfo
->
cur
);
}
}
return
0
;
}
static
void
doApplyIntervalQueryOnBlock
(
SMeterQuerySupportObj
*
pSupporter
,
SMeterQueryInfo
*
pInfo
,
...
...
src/system/detail/src/vnodeRead.c
浏览文件 @
a510bfbf
...
...
@@ -26,8 +26,6 @@
#include "vnodeRead.h"
#include "vnodeUtil.h"
#pragma GCC diagnostic ignored "-Wint-conversion"
int
(
*
pQueryFunc
[])(
SMeterObj
*
,
SQuery
*
)
=
{
vnodeQueryFromCache
,
vnodeQueryFromFile
};
int
vnodeInterpolationSearchKey
(
char
*
pValue
,
int
num
,
TSKEY
key
,
int
order
)
{
...
...
@@ -1003,8 +1001,9 @@ int32_t vnodeConvertQueryMeterMsg(SQueryMeterMsg *pQueryMsg) {
if
(
pDestFilterInfo
->
filterOnBinary
)
{
pDestFilterInfo
->
len
=
htobe64
(
pFilterInfo
->
len
);
pDestFilterInfo
->
pz
=
calloc
(
1
,
pDestFilterInfo
->
len
+
1
);
memcpy
(
pDestFilterInfo
->
pz
,
pMsg
,
pDestFilterInfo
->
len
+
1
);
pDestFilterInfo
->
pz
=
(
int64_t
)
calloc
(
1
,
pDestFilterInfo
->
len
+
1
);
memcpy
((
void
*
)
pDestFilterInfo
->
pz
,
pMsg
,
pDestFilterInfo
->
len
+
1
);
pMsg
+=
(
pDestFilterInfo
->
len
+
1
);
}
else
{
pDestFilterInfo
->
lowerBndi
=
htobe64
(
pFilterInfo
->
lowerBndi
);
...
...
@@ -1022,8 +1021,7 @@ int32_t vnodeConvertQueryMeterMsg(SQueryMeterMsg *pQueryMsg) {
* 1. simple projection query on meters, we only record the pSqlFuncExprs[i].colIdx value
* 2. for complex queries, whole SqlExprs object is required.
*/
pQueryMsg
->
pSqlFuncExprs
=
malloc
(
POINTER_BYTES
*
pQueryMsg
->
numOfOutputCols
);
pQueryMsg
->
pSqlFuncExprs
=
(
int64_t
)
malloc
(
POINTER_BYTES
*
pQueryMsg
->
numOfOutputCols
);
SSqlFuncExprMsg
*
pExprMsg
=
(
SSqlFuncExprMsg
*
)
pMsg
;
for
(
int32_t
i
=
0
;
i
<
pQueryMsg
->
numOfOutputCols
;
++
i
)
{
...
...
@@ -1070,7 +1068,7 @@ int32_t vnodeConvertQueryMeterMsg(SQueryMeterMsg *pQueryMsg) {
pQueryMsg
->
colNameLen
=
htonl
(
pQueryMsg
->
colNameLen
);
if
(
hasArithmeticFunction
)
{
// column name array
assert
(
pQueryMsg
->
colNameLen
>
0
);
pQueryMsg
->
colNameList
=
pMsg
;
pQueryMsg
->
colNameList
=
(
int64_t
)
pMsg
;
pMsg
+=
pQueryMsg
->
colNameLen
;
}
...
...
src/system/detail/src/vnodeShell.c
浏览文件 @
a510bfbf
...
...
@@ -30,7 +30,6 @@
#include "vnodeStore.h"
#include "tstatus.h"
#pragma GCC diagnostic ignored "-Wint-conversion"
extern
int
tsMaxQueues
;
void
*
pShellServer
=
NULL
;
...
...
@@ -390,7 +389,7 @@ _query_over:
tfree
(
pMeterObjList
);
ret
=
vnodeSendQueryRspMsg
(
pObj
,
code
,
pObj
->
qhandle
);
free
(
pQueryMsg
->
pSidExtInfo
);
t
free
(
pQueryMsg
->
pSidExtInfo
);
for
(
int32_t
i
=
0
;
i
<
pQueryMsg
->
numOfCols
;
++
i
)
{
vnodeFreeColumnInfo
(
&
pQueryMsg
->
colList
[
i
]);
}
...
...
@@ -455,7 +454,7 @@ void vnodeExecuteRetrieveReq(SSchedMsg *pSched) {
pRsp
->
precision
=
htons
(
timePrec
);
if
(
code
==
TSDB_CODE_SUCCESS
)
{
pRsp
->
offset
=
htobe64
(
vnodeGetOffsetVal
(
pRetrieve
->
qhandle
));
pRsp
->
offset
=
htobe64
(
vnodeGetOffsetVal
(
(
void
*
)
pRetrieve
->
qhandle
));
pRsp
->
useconds
=
htobe64
(((
SQInfo
*
)(
pRetrieve
->
qhandle
))
->
useconds
);
}
else
{
pRsp
->
offset
=
0
;
...
...
src/system/detail/src/vnodeStore.c
浏览文件 @
a510bfbf
...
...
@@ -24,9 +24,6 @@
#include "vnodeUtil.h"
#include "tstatus.h"
#pragma GCC diagnostic push
#pragma GCC diagnostic warning "-Woverflow"
int
tsMaxVnode
=
-
1
;
int
tsOpenVnodes
=
0
;
SVnodeObj
*
vnodeList
=
NULL
;
...
...
@@ -386,6 +383,3 @@ void vnodeCalcOpenVnodes() {
void
vnodeUpdateHeadFile
(
int
vnode
,
int
oldTables
,
int
newTables
)
{
//todo rewrite the head file with newTables
}
#pragma GCC diagnostic pop
src/system/detail/src/vnodeUtil.c
浏览文件 @
a510bfbf
...
...
@@ -23,8 +23,6 @@
#include "vnodeDataFilterFunc.h"
#include "vnodeUtil.h"
#pragma GCC diagnostic ignored "-Wint-conversion"
int
vnodeCheckFileIntegrity
(
FILE
*
fp
)
{
/*
int savedSessions, savedMeterSize;
...
...
src/system/lite/src/dnodeMgmt.spec.c
浏览文件 @
a510bfbf
...
...
@@ -50,7 +50,7 @@ char *taosBuildReqMsgToMnode(SMgmtObj *pObj, char type) {
}
int
taosSendMsgToMnode
(
SMgmtObj
*
pObj
,
char
*
msg
,
int
msgLen
)
{
dTrace
(
"msg:%s is sent to mnode"
,
taosMsg
[
*
(
msg
-
1
)]);
dTrace
(
"msg:%s is sent to mnode"
,
taosMsg
[
(
uint8_t
)(
*
(
msg
-
1
)
)]);
/*
* Lite version has no message header, so minus one
...
...
@@ -81,7 +81,7 @@ void vnodeProcessMsgFromMgmtSpec(SSchedMsg *sched) {
char
msgType
=
*
sched
->
msg
;
char
*
content
=
sched
->
msg
+
1
;
dTrace
(
"msg:%s is received from mgmt"
,
taosMsg
[
msgType
]);
dTrace
(
"msg:%s is received from mgmt"
,
taosMsg
[
(
uint8_t
)
msgType
]);
vnodeProcessMsgFromMgmt
(
content
,
0
,
msgType
,
0
);
...
...
src/system/lite/src/mgmtBalance.spec.c
浏览文件 @
a510bfbf
...
...
@@ -17,7 +17,7 @@
#include "mgmtBalance.h"
#include "tstatus.h"
void
mgmtStartBalanceTimer
(
int
mseconds
)
{}
void
mgmtStartBalanceTimer
(
int
64_t
mseconds
)
{}
int
mgmtInitBalance
()
{
return
0
;
}
...
...
src/system/lite/src/mgmtDnodeInt.spec.c
浏览文件 @
a510bfbf
...
...
@@ -61,7 +61,7 @@ char *taosBuildReqMsgToDnode(SDnodeObj *pObj, char type) {
int
taosSendSimpleRspToDnode
(
SDnodeObj
*
pObj
,
char
rsptype
,
char
code
)
{
return
0
;
}
int
taosSendMsgToDnode
(
SDnodeObj
*
pObj
,
char
*
msg
,
int
msgLen
)
{
mTrace
(
"msg:%s is sent to dnode"
,
taosMsg
[
*
(
msg
-
1
)]);
mTrace
(
"msg:%s is sent to dnode"
,
taosMsg
[
(
uint8_t
)(
*
(
msg
-
1
)
)]);
/*
* Lite version has no message header, so minus one
...
...
@@ -142,7 +142,7 @@ void mgmtProcessDnodeStatus(void *handle, void *tmrId) {
void
mgmtProcessMsgFromDnodeSpec
(
SSchedMsg
*
sched
)
{
char
msgType
=
*
sched
->
msg
;
char
*
content
=
sched
->
msg
+
1
;
mTrace
(
"msg:%s is received from dnode"
,
taosMsg
[
msgType
]);
mTrace
(
"msg:%s is received from dnode"
,
taosMsg
[
(
uint8_t
)
msgType
]);
mgmtProcessMsgFromDnode
(
content
,
0
,
msgType
,
mgmtGetDnode
(
0
));
free
(
sched
->
msg
);
...
...
src/system/lite/src/vnodeFile.spec.c
浏览文件 @
a510bfbf
...
...
@@ -24,7 +24,7 @@ char* vnodeGetDataDir(int vnode, int fileId) { return dataDir; }
void
vnodeAdustVnodeFile
(
SVnodeObj
*
pVnode
)
{
// Retention policy here
int
fileId
=
pVnode
->
fileId
-
pVnode
->
numOfFiles
+
1
;
int
cfile
=
taosGetTimestamp
(
pVnode
->
cfg
.
precision
)
/
pVnode
->
cfg
.
daysPerFile
/
tsMsPerDay
[
pVnode
->
cfg
.
precision
];
int
cfile
=
taosGetTimestamp
(
pVnode
->
cfg
.
precision
)
/
pVnode
->
cfg
.
daysPerFile
/
tsMsPerDay
[
(
uint8_t
)
pVnode
->
cfg
.
precision
];
while
(
fileId
<=
cfile
-
pVnode
->
maxFiles
)
{
vnodeRemoveFile
(
pVnode
->
vnode
,
fileId
);
pVnode
->
numOfFiles
--
;
...
...
src/util/src/tcrc32c.c
浏览文件 @
a510bfbf
...
...
@@ -25,8 +25,6 @@
#include <stdlib.h>
#include "tcrc32c.h"
//todo : use the original source code
//#pragma GCC diagnostic ignored "-Wunused-function"
#define POLY 0x82f63b78
#define LONG_SHIFT 8192
...
...
src/util/src/textbuffer.c
浏览文件 @
a510bfbf
...
...
@@ -23,8 +23,6 @@
#include "ttypes.h"
#include "tutil.h"
//#pragma GCC diagnostic ignored "-Wformat"
#define COLMODEL_GET_VAL(data, schema, allrow, rowId, colId) \
(data + (schema)->colOffset[colId] * (allrow) + (rowId) * (schema)->pFields[colId].bytes)
...
...
src/util/src/tsocket.c
浏览文件 @
a510bfbf
...
...
@@ -19,8 +19,6 @@
#include "tsocket.h"
#include "tutil.h"
unsigned
int
ip2uint
(
const
char
*
const
ip_addr
);
/*
* Function to get the public ip address of current machine. If get IP
* successfully, return 0, else, return -1. The return values is ip.
...
...
@@ -105,7 +103,7 @@ int taosGetPublicIp(char *const ip) {
}
// Function converting an IP address string to an unsigned int.
u
nsigned
in
t
ip2uint
(
const
char
*
const
ip_addr
)
{
u
int32_
t
ip2uint
(
const
char
*
const
ip_addr
)
{
char
ip_addr_cpy
[
20
];
char
ip
[
5
];
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录