Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
3d591668
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
未验证
提交
3d591668
编写于
11月 27, 2019
作者:
H
haojun Liao
提交者:
GitHub
11月 27, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #779 from taosdata/feature/slguan
Windows compilation, cluster stability modification
上级
903b88a5
495bb309
变更
9
显示空白变更内容
内联
并排
Showing
9 changed file
with
85 addition
and
59 deletion
+85
-59
src/inc/tnote.h
src/inc/tnote.h
+0
-1
src/kit/shell/src/shellEngine.c
src/kit/shell/src/shellEngine.c
+1
-0
src/os/windows/inc/os.h
src/os/windows/inc/os.h
+21
-9
src/os/windows/src/twindows.c
src/os/windows/src/twindows.c
+3
-1
src/sdb/src/sdbEngine.c
src/sdb/src/sdbEngine.c
+36
-26
src/system/detail/src/vnodeFile.c
src/system/detail/src/vnodeFile.c
+1
-0
src/system/detail/src/vnodeShell.c
src/system/detail/src/vnodeShell.c
+21
-17
src/util/CMakeLists.txt
src/util/CMakeLists.txt
+0
-3
src/util/src/version.c
src/util/src/version.c
+2
-2
未找到文件。
src/inc/tnote.h
浏览文件 @
3d591668
...
@@ -20,7 +20,6 @@
...
@@ -20,7 +20,6 @@
extern
"C"
{
extern
"C"
{
#endif
#endif
#include "unistd.h"
#include "os.h"
#include "os.h"
#include "tutil.h"
#include "tutil.h"
#include "tglobalcfg.h"
#include "tglobalcfg.h"
...
...
src/kit/shell/src/shellEngine.c
浏览文件 @
3d591668
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
#include "shellCommand.h"
#include "shellCommand.h"
#include "ttime.h"
#include "ttime.h"
#include "tutil.h"
#include "tutil.h"
#include <regex.h>
/**************** Global variables ****************/
/**************** Global variables ****************/
#ifdef WINDOWS
#ifdef WINDOWS
...
...
src/os/windows/inc/os.h
浏览文件 @
3d591668
...
@@ -16,20 +16,30 @@
...
@@ -16,20 +16,30 @@
#ifndef TDENGINE_PLATFORM_WINDOWS_H
#ifndef TDENGINE_PLATFORM_WINDOWS_H
#define TDENGINE_PLATFORM_WINDOWS_H
#define TDENGINE_PLATFORM_WINDOWS_H
#include <assert.h>
#include <ctype.h>
#include <direct.h>
#include <errno.h>
#include <fcntl.h>
#include <float.h>
#include <locale.h>
#include <intrin.h>
#include <io.h>
#include <io.h>
#include <math.h>
#include <pthread.h>
#include <semaphore.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <signal.h>
#include <stdint.h>
#include <sys/stat.h>
#include <stdbool.h>
#include <sys/types.h>
#include <pthread.h>
#include <time.h>
#include <direct.h>
#include "winsock2.h"
#include "winsock2.h"
#include <WS2tcpip.h>
#include <WS2tcpip.h>
#include <assert.h>
#include <math.h>
#include <string.h>
#include <assert.h>
#include <intrin.h>
#ifdef __cplusplus
#ifdef __cplusplus
extern
"C"
{
extern
"C"
{
...
@@ -366,6 +376,8 @@ int fsendfile(FILE* out_file, FILE* in_file, int64_t* offset, int32_t count);
...
@@ -366,6 +376,8 @@ int fsendfile(FILE* out_file, FILE* in_file, int64_t* offset, int32_t count);
char
*
strndup
(
const
char
*
s
,
size_t
n
);
char
*
strndup
(
const
char
*
s
,
size_t
n
);
void
taosSetCoreDump
();
#ifdef __cplusplus
#ifdef __cplusplus
}
}
#endif
#endif
...
...
src/os/windows/src/twindows.c
浏览文件 @
3d591668
...
@@ -395,3 +395,5 @@ char *strndup(const char *s, size_t n) {
...
@@ -395,3 +395,5 @@ char *strndup(const char *s, size_t n) {
r
[
len
]
=
0
;
r
[
len
]
=
0
;
return
r
;
return
r
;
}
}
void
taosSetCoreDump
()
{}
\ No newline at end of file
src/sdb/src/sdbEngine.c
浏览文件 @
3d591668
...
@@ -346,10 +346,16 @@ int64_t sdbInsertRow(void *handle, void *row, int rowSize) {
...
@@ -346,10 +346,16 @@ int64_t sdbInsertRow(void *handle, void *row, int rowSize) {
int
real_size
=
0
;
int
real_size
=
0
;
/* char action = SDB_TYPE_INSERT; */
/* char action = SDB_TYPE_INSERT; */
if
(
pTable
==
NULL
)
return
-
1
;
if
(
pTable
==
NULL
)
{
sdbError
(
"sdb tables is null"
);
return
-
1
;
}
if
((
pTable
->
keyType
!=
SDB_KEYTYPE_AUTO
)
||
*
((
int64_t
*
)
row
))
if
((
pTable
->
keyType
!=
SDB_KEYTYPE_AUTO
)
||
*
((
int64_t
*
)
row
))
if
(
sdbGetRow
(
handle
,
row
))
return
-
1
;
if
(
sdbGetRow
(
handle
,
row
))
{
sdbError
(
"table:%s, failed to insert record, sdbVersion:%d"
,
pTable
->
name
,
sdbVersion
);
return
-
1
;
}
total_size
=
sizeof
(
SRowHead
)
+
pTable
->
maxRowSize
+
sizeof
(
TSCKSUM
);
total_size
=
sizeof
(
SRowHead
)
+
pTable
->
maxRowSize
+
sizeof
(
TSCKSUM
);
SRowHead
*
rowHead
=
(
SRowHead
*
)
malloc
(
total_size
);
SRowHead
*
rowHead
=
(
SRowHead
*
)
malloc
(
total_size
);
...
@@ -408,24 +414,26 @@ int64_t sdbInsertRow(void *handle, void *row, int rowSize) {
...
@@ -408,24 +414,26 @@ 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
(
sdbTrace
(
"table:%s, a record is inserted:%s, sdbVersion:%ld id:%ld rowSize:%d numOfRows:%d fileSize:%ld"
,
"table:%s, a record is inserted:%s, sdbVersion:%ld id:%ld rowSize:%d numOfRows:%d fileSize:%ld"
,
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
:
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"
,
pTable
->
name
,
taosIpStr
(
*
(
int32_t
*
)
row
),
sdbVersion
,
rowHead
->
id
,
rowHead
->
rowSize
,
pTable
->
numOfRows
,
pTable
->
size
);
break
;
case
SDB_KEYTYPE_AUTO
:
case
SDB_KEYTYPE_AUTO
:
sdbTrace
(
sdbTrace
(
"table:%s, a record is inserted:%d, sdbVersion:%ld id:%ld rowSize:%d numOfRows:%d fileSize:%ld"
,
"table:%s, a record is inserted:%d, sdbVersion:%ld id:%ld rowSize:%d numOfRows:%d fileSize:%ld"
,
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
(
sdbTrace
(
"table:%s, a record is inserted, sdbVersion:%ld id:%ld rowSize:%d numOfRows:%d fileSize:%ld"
,
"table:%s, a record is inserted, sdbVersion:%ld id:%ld rowSize:%d numOfRows:%d fileSize:%ld"
,
pTable
->
name
,
sdbVersion
,
rowHead
->
id
,
rowHead
->
rowSize
,
pTable
->
numOfRows
,
pTable
->
size
);
pTable
->
name
,
sdbVersion
,
rowHead
->
id
,
rowHead
->
rowSize
,
pTable
->
numOfRows
,
pTable
->
size
);
break
;
break
;
}
}
id
=
rowMeta
.
id
;
id
=
rowMeta
.
id
;
}
else
{
sdbError
(
"table:%s, failed to insert record"
,
pTable
->
name
);
}
}
tfree
(
rowHead
);
tfree
(
rowHead
);
...
@@ -509,14 +517,15 @@ int sdbDeleteRow(void *handle, void *row) {
...
@@ -509,14 +517,15 @@ 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
(
sdbTrace
(
"table:%s, a record is deleted:%s, sdbVersion:%ld id:%ld numOfRows:%d"
,
"table:%s, a record is deleted:%s, sdbVersion:%ld id:%ld 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
:
case
SDB_KEYTYPE_UINT32
:
//dnodes or mnodes
sdbTrace
(
"table:%s, a record is deleted:%s, sdbVersion:%ld id:%ld numOfRows:%d"
,
pTable
->
name
,
taosIpStr
(
*
(
int32_t
*
)
row
),
sdbVersion
,
pTable
->
id
,
pTable
->
numOfRows
);
break
;
case
SDB_KEYTYPE_AUTO
:
case
SDB_KEYTYPE_AUTO
:
sdbTrace
(
sdbTrace
(
"table:%s, a record is deleted:%d, sdbVersion:%ld id:%ld numOfRows:%d"
,
"table:%s, a record is deleted:%d, sdbVersion:%ld id:%ld 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:
...
@@ -610,14 +619,15 @@ int sdbUpdateRow(void *handle, void *row, int updateSize, char isUpdated) {
...
@@ -610,14 +619,15 @@ 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
(
sdbTrace
(
"table:%s, a record is updated:%s, sdbVersion:%ld id:%ld numOfRows:%d"
,
"table:%s, a record is updated:%s, sdbVersion:%ld id:%ld 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
:
case
SDB_KEYTYPE_UINT32
:
//dnodes or mnodes
sdbTrace
(
"table:%s, a record is updated:%d, sdbVersion:%ld id:%ld numOfRows:%d"
,
pTable
->
name
,
taosIpStr
(
*
(
int32_t
*
)
row
),
sdbVersion
,
pTable
->
id
,
pTable
->
numOfRows
);
break
;
case
SDB_KEYTYPE_AUTO
:
case
SDB_KEYTYPE_AUTO
:
sdbTrace
(
sdbTrace
(
"table:%s, a record is updated:%d, sdbVersion:%ld id:%ld numOfRows:%d"
,
"table:%s, a record is updated:%d, sdbVersion:%ld id:%ld 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:
...
...
src/system/detail/src/vnodeFile.c
浏览文件 @
3d591668
...
@@ -114,6 +114,7 @@ int vnodeCreateHeadDataFile(int vnode, int fileId, char *headName, char *dataNam
...
@@ -114,6 +114,7 @@ int vnodeCreateHeadDataFile(int vnode, int fileId, char *headName, char *dataNam
char
*
path
=
vnodeGetDataDir
(
vnode
,
fileId
);
char
*
path
=
vnodeGetDataDir
(
vnode
,
fileId
);
if
(
path
==
NULL
)
{
if
(
path
==
NULL
)
{
dError
(
"vid:%d, fileId:%d, failed to get dataDir"
,
vnode
,
fileId
);
return
-
1
;
return
-
1
;
}
}
...
...
src/system/detail/src/vnodeShell.c
浏览文件 @
3d591668
...
@@ -88,28 +88,32 @@ void *vnodeProcessMsgFromShell(char *msg, void *ahandle, void *thandle) {
...
@@ -88,28 +88,32 @@ void *vnodeProcessMsgFromShell(char *msg, void *ahandle, void *thandle) {
}
}
}
}
// if ( vnodeList[vnode].status != TSDB_STATUS_MASTER && pMsg->msgType != TSDB_MSG_TYPE_RETRIEVE ) {
#ifdef CLUSTER
if
(
vnodeList
[
vnode
].
vnodeStatus
!=
TSDB_VN_STATUS_MASTER
)
{
taosSendSimpleRsp
(
thandle
,
pMsg
->
msgType
+
1
,
TSDB_CODE_NOT_READY
);
dTrace
(
"vid:%d sid:%d, shell msg is ignored since in state:%d"
,
vnode
,
sid
,
vnodeList
[
vnode
].
vnodeStatus
);
}
else
{
#endif
dTrace
(
"vid:%d sid:%d, msg:%s is received pConn:%p"
,
vnode
,
sid
,
taosMsg
[
pMsg
->
msgType
],
thandle
);
dTrace
(
"vid:%d sid:%d, msg:%s is received pConn:%p"
,
vnode
,
sid
,
taosMsg
[
pMsg
->
msgType
],
thandle
);
if
(
pMsg
->
msgType
==
TSDB_MSG_TYPE_QUERY
)
{
if
(
pMsg
->
msgType
==
TSDB_MSG_TYPE_QUERY
)
{
if
(
vnodeList
[
vnode
].
vnodeStatus
==
TSDB_VN_STATUS_MASTER
||
vnodeList
[
vnode
].
vnodeStatus
==
TSDB_VN_STATUS_SLAVE
)
{
vnodeProcessQueryRequest
((
char
*
)
pMsg
->
content
,
pMsg
->
msgLen
-
sizeof
(
SIntMsg
),
pObj
);
vnodeProcessQueryRequest
((
char
*
)
pMsg
->
content
,
pMsg
->
msgLen
-
sizeof
(
SIntMsg
),
pObj
);
}
else
{
taosSendSimpleRsp
(
thandle
,
pMsg
->
msgType
+
1
,
TSDB_CODE_NOT_READY
);
dTrace
(
"vid:%d sid:%d, shell query msg is ignored since in status:%s"
,
vnode
,
sid
,
taosGetVnodeStatusStr
(
vnodeList
[
vnode
].
vnodeStatus
));
}
}
else
if
(
pMsg
->
msgType
==
TSDB_MSG_TYPE_RETRIEVE
)
{
}
else
if
(
pMsg
->
msgType
==
TSDB_MSG_TYPE_RETRIEVE
)
{
vnodeProcessRetrieveRequest
((
char
*
)
pMsg
->
content
,
pMsg
->
msgLen
-
sizeof
(
SIntMsg
),
pObj
);
if
(
vnodeList
[
vnode
].
vnodeStatus
==
TSDB_VN_STATUS_MASTER
||
vnodeList
[
vnode
].
vnodeStatus
==
TSDB_VN_STATUS_SLAVE
)
{
vnodeProcessRetrieveRequest
((
char
*
)
pMsg
->
content
,
pMsg
->
msgLen
-
sizeof
(
SIntMsg
),
pObj
);
}
else
{
taosSendSimpleRsp
(
thandle
,
pMsg
->
msgType
+
1
,
TSDB_CODE_NOT_READY
);
dTrace
(
"vid:%d sid:%d, shell retrieve msg is ignored since in status:%s"
,
vnode
,
sid
,
taosGetVnodeStatusStr
(
vnodeList
[
vnode
].
vnodeStatus
));
}
}
else
if
(
pMsg
->
msgType
==
TSDB_MSG_TYPE_SUBMIT
)
{
}
else
if
(
pMsg
->
msgType
==
TSDB_MSG_TYPE_SUBMIT
)
{
vnodeProcessShellSubmitRequest
((
char
*
)
pMsg
->
content
,
pMsg
->
msgLen
-
sizeof
(
SIntMsg
),
pObj
);
if
(
vnodeList
[
vnode
].
vnodeStatus
==
TSDB_VN_STATUS_MASTER
)
{
vnodeProcessShellSubmitRequest
((
char
*
)
pMsg
->
content
,
pMsg
->
msgLen
-
sizeof
(
SIntMsg
),
pObj
);
}
else
{
}
else
{
dError
(
"%s is not processed"
,
taosMsg
[
pMsg
->
msgType
]);
taosSendSimpleRsp
(
thandle
,
pMsg
->
msgType
+
1
,
TSDB_CODE_NOT_READY
);
dTrace
(
"vid:%d sid:%d, shell submit msg is ignored since in status:%s"
,
vnode
,
sid
,
taosGetVnodeStatusStr
(
vnodeList
[
vnode
].
vnodeStatus
));
}
}
#ifdef CLUSTER
}
else
{
dError
(
"%s is not processed"
,
taosMsg
[
pMsg
->
msgType
]);
}
}
#endif
return
pObj
;
return
pObj
;
}
}
...
...
src/util/CMakeLists.txt
浏览文件 @
3d591668
...
@@ -37,7 +37,6 @@ ELSEIF (TD_WINDOWS_64)
...
@@ -37,7 +37,6 @@ ELSEIF (TD_WINDOWS_64)
LIST
(
APPEND SRC ./src/ihash.c
)
LIST
(
APPEND SRC ./src/ihash.c
)
LIST
(
APPEND SRC ./src/lz4.c
)
LIST
(
APPEND SRC ./src/lz4.c
)
LIST
(
APPEND SRC ./src/shash.c
)
LIST
(
APPEND SRC ./src/shash.c
)
LIST
(
APPEND SRC ./src/sql.c
)
LIST
(
APPEND SRC ./src/tbase64.c
)
LIST
(
APPEND SRC ./src/tbase64.c
)
LIST
(
APPEND SRC ./src/tcache.c
)
LIST
(
APPEND SRC ./src/tcache.c
)
LIST
(
APPEND SRC ./src/tcompression.c
)
LIST
(
APPEND SRC ./src/tcompression.c
)
...
@@ -59,8 +58,6 @@ ELSEIF (TD_WINDOWS_64)
...
@@ -59,8 +58,6 @@ ELSEIF (TD_WINDOWS_64)
LIST
(
APPEND SRC ./src/tskiplist.c
)
LIST
(
APPEND SRC ./src/tskiplist.c
)
LIST
(
APPEND SRC ./src/tsocket.c
)
LIST
(
APPEND SRC ./src/tsocket.c
)
LIST
(
APPEND SRC ./src/tstatus.c
)
LIST
(
APPEND SRC ./src/tstatus.c
)
LIST
(
APPEND SRC ./src/tstoken.c
)
LIST
(
APPEND SRC ./src/tstoken.c
)
LIST
(
APPEND SRC ./src/tstrbuild.c
)
LIST
(
APPEND SRC ./src/tstrbuild.c
)
LIST
(
APPEND SRC ./src/ttime.c
)
LIST
(
APPEND SRC ./src/ttime.c
)
LIST
(
APPEND SRC ./src/ttimer.c
)
LIST
(
APPEND SRC ./src/ttimer.c
)
...
...
src/util/src/version.c
浏览文件 @
3d591668
char
version
[
64
]
=
"1.6.4.0"
;
char
version
[
64
]
=
"1.6.4.0"
;
char
compatible_version
[
64
]
=
"1.6.1.0"
;
char
compatible_version
[
64
]
=
"1.6.1.0"
;
char
gitinfo
[
128
]
=
"
d04354a8ac2f7dd9ba521d755e5d484a203783d9
"
;
char
gitinfo
[
128
]
=
"
b6e308866e315483915f4c42a2717547ed0b9d36
"
;
char
buildinfo
[
512
]
=
"Built by
root at 2019-11-11 10:23
"
;
char
buildinfo
[
512
]
=
"Built by
ubuntu at 2019-11-26 21:56
"
;
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录