Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Cherenkov effect
TDengine
提交
ad54000a
T
TDengine
项目概览
Cherenkov effect
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
2
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
ad54000a
编写于
12月 07, 2019
作者:
H
haojun Liao
提交者:
GitHub
12月 07, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #874 from taosdata/feature/slguan
add some logs
上级
4b15fd32
c246456c
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
18 addition
and
16 deletion
+18
-16
CMakeLists.txt
CMakeLists.txt
+5
-5
src/client/src/TSDBJNIConnector.c
src/client/src/TSDBJNIConnector.c
+8
-5
src/modules/http/src/httpHandle.c
src/modules/http/src/httpHandle.c
+1
-2
src/modules/http/src/httpServer.c
src/modules/http/src/httpServer.c
+4
-4
未找到文件。
CMakeLists.txt
浏览文件 @
ad54000a
...
...
@@ -141,12 +141,12 @@ IF (NOT DEFINED TD_CLUSTER)
SET
(
RELEASE_FLAGS
"-O0"
)
IF
(
NOT TD_ARM
)
IF
(
${
CMAKE_CXX_COMPILER_ID
}
MATCHES
"Clang"
)
SET
(
COMMON_FLAGS
"-std=gnu99 -Wall -fPIC -malign-double -g -
Wno-char-subscripts -
msse4.2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE"
)
SET
(
COMMON_FLAGS
"-std=gnu99 -Wall -fPIC -malign-double -g -msse4.2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE"
)
ELSE
()
SET
(
COMMON_FLAGS
"-std=gnu99 -Wall -fPIC -malign-double -g -
Wno-char-subscripts -
malign-stringops -msse4.2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE"
)
SET
(
COMMON_FLAGS
"-std=gnu99 -Wall -fPIC -malign-double -g -malign-stringops -msse4.2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE"
)
ENDIF
()
ELSE
()
SET
(
COMMON_FLAGS
"-std=gnu99 -Wall -fPIC -g -
Wno-char-subscripts -
fsigned-char -fpack-struct=8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE"
)
SET
(
COMMON_FLAGS
"-std=gnu99 -Wall -fPIC -g -fsigned-char -fpack-struct=8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE"
)
ENDIF
()
ADD_DEFINITIONS
(
-DLINUX
)
ADD_DEFINITIONS
(
-D_REENTRANT -D__USE_POSIX -D_LIBC_REENTRANT
)
...
...
@@ -156,7 +156,7 @@ IF (NOT DEFINED TD_CLUSTER)
ENDIF
()
SET
(
DEBUG_FLAGS
"-O0 -DDEBUG"
)
SET
(
RELEASE_FLAGS
"-O0"
)
SET
(
COMMON_FLAGS
"-std=gnu99 -Wall -fPIC -g -
Wno-char-subscripts -
fsigned-char -munaligned-access -fpack-struct=8 -latomic -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE"
)
SET
(
COMMON_FLAGS
"-std=gnu99 -Wall -fPIC -g -fsigned-char -munaligned-access -fpack-struct=8 -latomic -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE"
)
ADD_DEFINITIONS
(
-DLINUX
)
ADD_DEFINITIONS
(
-D_REENTRANT -D__USE_POSIX -D_LIBC_REENTRANT
)
ADD_DEFINITIONS
(
-DUSE_LIBICONV
)
...
...
@@ -171,7 +171,7 @@ IF (NOT DEFINED TD_CLUSTER)
ADD_DEFINITIONS
(
-DPTW32_BUILD
)
ADD_DEFINITIONS
(
-D_MBCS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
)
ELSEIF
(
TD_DARWIN_64
)
SET
(
COMMON_FLAGS
"-std=gnu99 -Wall -fPIC -malign-double -g -
Wno-char-subscripts -msse4.2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -Wno-unused-variable -Wno-bitfield-constant-conversion
"
)
SET
(
COMMON_FLAGS
"-std=gnu99 -Wall -fPIC -malign-double -g -
msse4.2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE
"
)
SET
(
DEBUG_FLAGS
"-O0 -DDEBUG"
)
SET
(
RELEASE_FLAGS
"-O0"
)
ADD_DEFINITIONS
(
-DDARWIN
)
...
...
src/client/src/TSDBJNIConnector.c
浏览文件 @
ad54000a
...
...
@@ -239,7 +239,7 @@ JNIEXPORT jint JNICALL Java_com_taosdata_jdbc_TSDBJNIConnector_executeQueryImp(J
jbyteArray
jsql
,
jlong
con
)
{
TAOS
*
tscon
=
(
TAOS
*
)
con
;
if
(
tscon
==
NULL
)
{
jniError
(
"jobj:%p, connection is closed"
,
jobj
);
jniError
(
"jobj:%p, connection is
already
closed"
,
jobj
);
return
JNI_CONNECTION_NULL
;
}
...
...
@@ -252,6 +252,7 @@ JNIEXPORT jint JNICALL Java_com_taosdata_jdbc_TSDBJNIConnector_executeQueryImp(J
char
*
dst
=
(
char
*
)
calloc
(
1
,
sizeof
(
char
)
*
(
len
+
1
));
if
(
dst
==
NULL
)
{
jniError
(
"jobj:%p, conn:%p, can not alloc memory"
,
jobj
,
tscon
);
return
JNI_OUT_OF_MEMORY
;
}
...
...
@@ -260,6 +261,8 @@ JNIEXPORT jint JNICALL Java_com_taosdata_jdbc_TSDBJNIConnector_executeQueryImp(J
//todo handle error
}
jniTrace
(
"jobj:%p, conn:%p, sql:%s"
,
jobj
,
tscon
,
sql
);
int
code
=
taos_query
(
tscon
,
dst
);
if
(
code
!=
0
)
{
jniError
(
"jobj:%p, conn:%p, code:%d, msg:%s, sql:%s"
,
jobj
,
tscon
,
code
,
taos_errstr
(
tscon
),
dst
);
...
...
@@ -271,9 +274,9 @@ JNIEXPORT jint JNICALL Java_com_taosdata_jdbc_TSDBJNIConnector_executeQueryImp(J
if
(
pSql
->
cmd
.
command
==
TSDB_SQL_INSERT
)
{
affectRows
=
taos_affected_rows
(
tscon
);
jniTrace
(
"jobj:%p, conn:%p, code:%d, affect rows:%d
, sql:%s
"
,
jobj
,
tscon
,
code
,
affectRows
,
dst
);
jniTrace
(
"jobj:%p, conn:%p, code:%d, affect rows:%d"
,
jobj
,
tscon
,
code
,
affectRows
,
dst
);
}
else
{
jniTrace
(
"jobj:%p, conn:%p, code:%d
, sql:%s
"
,
jobj
,
tscon
,
code
,
dst
);
jniTrace
(
"jobj:%p, conn:%p, code:%d"
,
jobj
,
tscon
,
code
,
dst
);
}
free
(
dst
);
...
...
@@ -307,7 +310,7 @@ JNIEXPORT jlong JNICALL Java_com_taosdata_jdbc_TSDBJNIConnector_getResultSetImp(
if
(
tscIsUpdateQuery
(
tscon
))
{
ret
=
0
;
// for update query, no result pointer
jniTrace
(
"jobj:%p, conn:%p, no result"
,
jobj
,
tscon
);
jniTrace
(
"jobj:%p, conn:%p, no result
set
"
,
jobj
,
tscon
);
}
else
{
ret
=
(
jlong
)
taos_use_result
(
tscon
);
jniTrace
(
"jobj:%p, conn:%p, get resultset:%p"
,
jobj
,
tscon
,
(
void
*
)
ret
);
...
...
@@ -496,7 +499,7 @@ JNIEXPORT jint JNICALL Java_com_taosdata_jdbc_TSDBJNIConnector_closeConnectionIm
jlong
con
)
{
TAOS
*
tscon
=
(
TAOS
*
)
con
;
if
(
tscon
==
NULL
)
{
jniError
(
"jobj:%p, connection is closed"
,
jobj
);
jniError
(
"jobj:%p, connection is
already
closed"
,
jobj
);
return
JNI_CONNECTION_NULL
;
}
else
{
jniTrace
(
"jobj:%p, conn:%p, close connection success"
,
jobj
,
tscon
);
...
...
src/modules/http/src/httpHandle.c
浏览文件 @
ad54000a
...
...
@@ -279,8 +279,7 @@ bool httpReadChunkedBody(HttpContext* pContext, HttpParser* pParser) {
httpParseChunkedBody
(
pContext
,
pParser
,
false
);
return
HTTP_CHECK_BODY_SUCCESS
;
}
else
{
httpTrace
(
"context:%p, fd:%d, ip:%s, chunked body not finished, continue read"
,
pContext
,
pContext
->
fd
,
pContext
->
ipstr
);
httpTrace
(
"context:%p, fd:%d, ip:%s, chunked body not finished, continue read"
,
pContext
,
pContext
->
fd
,
pContext
->
ipstr
);
if
(
!
httpReadDataImp
(
pContext
))
{
httpError
(
"context:%p, fd:%d, ip:%s, read chunked request error"
,
pContext
,
pContext
->
fd
,
pContext
->
ipstr
);
return
HTTP_CHECK_BODY_ERROR
;
...
...
src/modules/http/src/httpServer.c
浏览文件 @
ad54000a
...
...
@@ -101,7 +101,7 @@ void httpFreeContext(HttpServer *pServer, HttpContext *pContext) {
void
httpCleanUpContextTimer
(
HttpContext
*
pContext
)
{
if
(
pContext
->
timer
!=
NULL
)
{
taosTmrStopA
(
&
pContext
->
timer
);
httpTrace
(
"context:%p, ip:%s, close timer:%p"
,
pContext
,
pContext
->
ipstr
,
pContext
->
timer
);
//
httpTrace("context:%p, ip:%s, close timer:%p", pContext, pContext->ipstr, pContext->timer);
pContext
->
timer
=
NULL
;
}
}
...
...
@@ -329,8 +329,6 @@ bool httpReadDataImp(HttpContext *pContext) {
}
pParser
->
buffer
[
pParser
->
bufsize
]
=
0
;
httpTrace
(
"context:%p, fd:%d, ip:%s, thread:%s, read size:%d"
,
pContext
,
pContext
->
fd
,
pContext
->
ipstr
,
pContext
->
pThread
->
label
,
pParser
->
bufsize
);
return
true
;
}
...
...
@@ -383,10 +381,12 @@ bool httpReadData(HttpThread *pThread, HttpContext *pContext) {
int
ret
=
httpCheckReadCompleted
(
pContext
);
if
(
ret
==
HTTP_CHECK_BODY_CONTINUE
)
{
taosTmrReset
(
httpCloseContextByServerForExpired
,
HTTP_EXPIRED_TIME
,
pContext
,
pThread
->
pServer
->
timerHandle
,
&
pContext
->
timer
);
httpTrace
(
"context:%p, fd:%d, ip:%s, not finished yet, try another times, timer:%p"
,
pContext
,
pContext
->
fd
,
pContext
->
ipstr
,
pContext
->
timer
);
//
httpTrace("context:%p, fd:%d, ip:%s, not finished yet, try another times, timer:%p", pContext, pContext->fd, pContext->ipstr, pContext->timer);
return
false
;
}
else
if
(
ret
==
HTTP_CHECK_BODY_SUCCESS
){
httpCleanUpContextTimer
(
pContext
);
httpTrace
(
"context:%p, fd:%d, ip:%s, thread:%s, read size:%d, dataLen:%d"
,
pContext
,
pContext
->
fd
,
pContext
->
ipstr
,
pContext
->
pThread
->
label
,
pContext
->
parser
.
bufsize
,
pContext
->
parser
.
data
.
len
);
if
(
httpDecompressData
(
pContext
))
{
return
true
;
}
else
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录