Merge branch 'develop' into feature/slguan

This commit is contained in:
slguan 2019-11-16 16:56:14 +08:00
commit 5e48daf58f
80 changed files with 231 additions and 541 deletions

View File

@ -49,6 +49,7 @@ cp ${compile_dir}/build/bin/taosd ${pkg_dir}${install_home_pat
cp ${compile_dir}/build/bin/taos ${pkg_dir}${install_home_path}/bin cp ${compile_dir}/build/bin/taos ${pkg_dir}${install_home_path}/bin
cp ${compile_dir}/build/lib/${libfile} ${pkg_dir}${install_home_path}/driver cp ${compile_dir}/build/lib/${libfile} ${pkg_dir}${install_home_path}/driver
cp ${compile_dir}/../src/inc/taos.h ${pkg_dir}${install_home_path}/include cp ${compile_dir}/../src/inc/taos.h ${pkg_dir}${install_home_path}/include
cp ${compile_dir}/../src/inc/taoserror.h ${pkg_dir}${install_home_path}/include
cp -r ${top_dir}/tests/examples/* ${pkg_dir}${install_home_path}/examples cp -r ${top_dir}/tests/examples/* ${pkg_dir}${install_home_path}/examples
cp -r ${top_dir}/src/connector/grafana ${pkg_dir}${install_home_path}/connector cp -r ${top_dir}/src/connector/grafana ${pkg_dir}${install_home_path}/connector
cp -r ${top_dir}/src/connector/python ${pkg_dir}${install_home_path}/connector cp -r ${top_dir}/src/connector/python ${pkg_dir}${install_home_path}/connector

View File

@ -62,6 +62,7 @@ cp %{_compiledir}/build/bin/taosdemo %{buildroot}%{homepath}/bin
cp %{_compiledir}/build/bin/taosdump %{buildroot}%{homepath}/bin cp %{_compiledir}/build/bin/taosdump %{buildroot}%{homepath}/bin
cp %{_compiledir}/build/lib/${libfile} %{buildroot}%{homepath}/driver cp %{_compiledir}/build/lib/${libfile} %{buildroot}%{homepath}/driver
cp %{_compiledir}/../src/inc/taos.h %{buildroot}%{homepath}/include cp %{_compiledir}/../src/inc/taos.h %{buildroot}%{homepath}/include
cp %{_compiledir}/../src/inc/taoserror.h %{buildroot}%{homepath}/include
cp -r %{_compiledir}/../src/connector/grafana %{buildroot}%{homepath}/connector cp -r %{_compiledir}/../src/connector/grafana %{buildroot}%{homepath}/connector
cp -r %{_compiledir}/../src/connector/python %{buildroot}%{homepath}/connector cp -r %{_compiledir}/../src/connector/python %{buildroot}%{homepath}/connector
cp -r %{_compiledir}/../src/connector/go %{buildroot}%{homepath}/connector cp -r %{_compiledir}/../src/connector/go %{buildroot}%{homepath}/connector
@ -138,6 +139,7 @@ if [ $1 -eq 0 ];then
${csudo} rm -f ${bin_link_dir}/taosdump || : ${csudo} rm -f ${bin_link_dir}/taosdump || :
${csudo} rm -f ${cfg_link_dir}/* || : ${csudo} rm -f ${cfg_link_dir}/* || :
${csudo} rm -f ${inc_link_dir}/taos.h || : ${csudo} rm -f ${inc_link_dir}/taos.h || :
${csudo} rm -f ${inc_link_dir}/taoserror.h || :
${csudo} rm -f ${lib_link_dir}/libtaos.* || : ${csudo} rm -f ${lib_link_dir}/libtaos.* || :
${csudo} rm -f ${log_link_dir} || : ${csudo} rm -f ${log_link_dir} || :

View File

@ -98,9 +98,10 @@ function install_lib() {
} }
function install_header() { function install_header() {
${csudo} rm -f ${inc_link_dir}/taos.h || : ${csudo} rm -f ${inc_link_dir}/taos.h ${inc_link_dir}/taoserror.h || :
${csudo} cp -f ${script_dir}/inc/* ${install_main_dir}/include && ${csudo} chmod 644 ${install_main_dir}/include/* ${csudo} cp -f ${script_dir}/inc/* ${install_main_dir}/include && ${csudo} chmod 644 ${install_main_dir}/include/*
${csudo} ln -s ${install_main_dir}/include/taos.h ${inc_link_dir}/taos.h ${csudo} ln -s ${install_main_dir}/include/taos.h ${inc_link_dir}/taos.h
${csudo} ln -s ${install_main_dir}/include/taoserror.h ${inc_link_dir}/taoserror.h
} }
function install_config() { function install_config() {

View File

@ -109,9 +109,10 @@ function install_lib() {
function install_header() { function install_header() {
${csudo} rm -f ${inc_link_dir}/taos.h || : ${csudo} rm -f ${inc_link_dir}/taos.h ${inc_link_dir}/taoserror.h || :
${csudo} cp -f ${source_dir}/src/inc/taos.h ${install_main_dir}/include && ${csudo} chmod 644 ${install_main_dir}/include/* ${csudo} cp -f ${source_dir}/src/inc/taos.h ${source_dir}/src/inc/taoserror.h ${install_main_dir}/include && ${csudo} chmod 644 ${install_main_dir}/include/*
${csudo} ln -s ${install_main_dir}/include/taos.h ${inc_link_dir}/taos.h ${csudo} ln -s ${install_main_dir}/include/taos.h ${inc_link_dir}/taos.h
${csudo} ln -s ${install_main_dir}/include/taoserror.h ${inc_link_dir}/taoserror.h
} }
function install_config() { function install_config() {

View File

@ -22,7 +22,7 @@ install_dir="${release_dir}/taos-${version}-${package_name}-$(echo ${build_time}
bin_files="${build_dir}/bin/taosd ${build_dir}/bin/taos ${build_dir}/bin/taosdemo ${build_dir}/bin/taosdump ${script_dir}/remove.sh" bin_files="${build_dir}/bin/taosd ${build_dir}/bin/taos ${build_dir}/bin/taosdemo ${build_dir}/bin/taosdump ${script_dir}/remove.sh"
versioninfo=$(${script_dir}/get_version.sh ${code_dir}/util/src/version.c) versioninfo=$(${script_dir}/get_version.sh ${code_dir}/util/src/version.c)
lib_files="${build_dir}/lib/libtaos.so.${versioninfo}" lib_files="${build_dir}/lib/libtaos.so.${versioninfo}"
header_files="${code_dir}/inc/taos.h" header_files="${code_dir}/inc/taos.h ${code_dir}/inc/taoserror.h"
cfg_files="${top_dir}/packaging/cfg/*.cfg" cfg_files="${top_dir}/packaging/cfg/*.cfg"
install_files="${script_dir}/install.sh ${script_dir}/install_client.sh" install_files="${script_dir}/install.sh ${script_dir}/install_client.sh"

View File

@ -61,8 +61,9 @@ function kill_taosd() {
} }
function install_include() { function install_include() {
${csudo} rm -f ${inc_link_dir}/taos.h || : ${csudo} rm -f ${inc_link_dir}/taos.h ${inc_link_dir}/taoserror.h|| :
${csudo} ln -s ${inc_dir}/taos.h ${inc_link_dir}/taos.h ${csudo} ln -s ${inc_dir}/taos.h ${inc_link_dir}/taos.h
${csudo} ln -s ${inc_dir}/taoserror.h ${inc_link_dir}/taoserror.h
} }
function install_lib() { function install_lib() {

View File

@ -94,6 +94,7 @@ ${csudo} rm -f ${bin_link_dir}/taosdemo || :
${csudo} rm -f ${bin_link_dir}/taosdump || : ${csudo} rm -f ${bin_link_dir}/taosdump || :
${csudo} rm -f ${cfg_link_dir}/* || : ${csudo} rm -f ${cfg_link_dir}/* || :
${csudo} rm -f ${inc_link_dir}/taos.h || : ${csudo} rm -f ${inc_link_dir}/taos.h || :
${csudo} rm -f ${inc_link_dir}/taoserror.h || :
${csudo} rm -f ${lib_link_dir}/libtaos.* || : ${csudo} rm -f ${lib_link_dir}/libtaos.* || :
${csudo} rm -f ${log_link_dir} || : ${csudo} rm -f ${log_link_dir} || :

View File

@ -61,6 +61,7 @@ function clean_lib() {
function clean_header() { function clean_header() {
# Remove link # Remove link
${csudo} rm -f ${inc_link_dir}/taos.h || : ${csudo} rm -f ${inc_link_dir}/taos.h || :
${csudo} rm -f ${inc_link_dir}/taoserror.h || :
} }
function clean_config() { function clean_config() {

View File

@ -191,10 +191,10 @@ int32_t tsParseOneColumnData(SSchema *pSchema, SSQLToken *pToken, char *payload,
*((int8_t *)payload) = TSDB_DATA_TINYINT_NULL; *((int8_t *)payload) = TSDB_DATA_TINYINT_NULL;
} else { } else {
numType = tscToInteger(pToken, &iv, &endptr); numType = tscToInteger(pToken, &iv, &endptr);
if (errno == ERANGE || iv > INT8_MAX || iv <= INT8_MIN) { if (TK_ILLEGAL == numType) {
INVALID_SQL_RET_MSG(msg, "data is overflow");
} else if (TK_ILLEGAL == numType) {
INVALID_SQL_RET_MSG(msg, "data is illegal"); INVALID_SQL_RET_MSG(msg, "data is illegal");
} else if (errno == ERANGE || iv > INT8_MAX || iv <= INT8_MIN) {
INVALID_SQL_RET_MSG(msg, "data is overflow");
} }
*((int8_t *)payload) = (int8_t)iv; *((int8_t *)payload) = (int8_t)iv;
@ -210,10 +210,10 @@ int32_t tsParseOneColumnData(SSchema *pSchema, SSQLToken *pToken, char *payload,
*((int16_t *)payload) = TSDB_DATA_SMALLINT_NULL; *((int16_t *)payload) = TSDB_DATA_SMALLINT_NULL;
} else { } else {
numType = tscToInteger(pToken, &iv, &endptr); numType = tscToInteger(pToken, &iv, &endptr);
if (errno == ERANGE || iv > INT16_MAX || iv <= INT16_MIN) { if (TK_ILLEGAL == numType) {
INVALID_SQL_RET_MSG(msg, "data is overflow");
} else if (TK_ILLEGAL == numType) {
INVALID_SQL_RET_MSG(msg, "data is illegal"); INVALID_SQL_RET_MSG(msg, "data is illegal");
} else if (errno == ERANGE || iv > INT16_MAX || iv <= INT16_MIN) {
INVALID_SQL_RET_MSG(msg, "data is overflow");
} }
*((int16_t *)payload) = (int16_t)iv; *((int16_t *)payload) = (int16_t)iv;
@ -228,10 +228,10 @@ int32_t tsParseOneColumnData(SSchema *pSchema, SSQLToken *pToken, char *payload,
*((int32_t *)payload) = TSDB_DATA_INT_NULL; *((int32_t *)payload) = TSDB_DATA_INT_NULL;
} else { } else {
numType = tscToInteger(pToken, &iv, &endptr); numType = tscToInteger(pToken, &iv, &endptr);
if (errno == ERANGE || iv > INT32_MAX || iv <= INT32_MIN) { if (TK_ILLEGAL == numType) {
INVALID_SQL_RET_MSG(msg, "data is overflow");
} else if (TK_ILLEGAL == numType) {
INVALID_SQL_RET_MSG(msg, "data is illegal"); INVALID_SQL_RET_MSG(msg, "data is illegal");
} else if (errno == ERANGE || iv > INT32_MAX || iv <= INT32_MIN) {
INVALID_SQL_RET_MSG(msg, "data is overflow");
} }
*((int32_t *)payload) = (int32_t)iv; *((int32_t *)payload) = (int32_t)iv;
@ -247,10 +247,10 @@ int32_t tsParseOneColumnData(SSchema *pSchema, SSQLToken *pToken, char *payload,
*((int64_t *)payload) = TSDB_DATA_BIGINT_NULL; *((int64_t *)payload) = TSDB_DATA_BIGINT_NULL;
} else { } else {
numType = tscToInteger(pToken, &iv, &endptr); numType = tscToInteger(pToken, &iv, &endptr);
if (errno == ERANGE || iv > INT64_MAX || iv <= INT64_MIN) { if (TK_ILLEGAL == numType) {
INVALID_SQL_RET_MSG(msg, "data is overflow");
} else if (TK_ILLEGAL == numType) {
INVALID_SQL_RET_MSG(msg, "data is illegal"); INVALID_SQL_RET_MSG(msg, "data is illegal");
} else if (errno == ERANGE || iv > INT64_MAX || iv <= INT64_MIN) {
INVALID_SQL_RET_MSG(msg, "data is overflow");
} }
*((int64_t *)payload) = iv; *((int64_t *)payload) = iv;

View File

@ -281,9 +281,9 @@ void tscGetConnToVnode(SSqlObj *pSql, uint8_t *pCode) {
break; break;
} }
// the pSql->res.code is the previous error code. // the pSql->res.code is the previous error(status) code.
if (pSql->thandle == NULL && pSql->retry >= pSql->maxRetry) { if (pSql->thandle == NULL && pSql->retry >= pSql->maxRetry) {
if (pSql->res.code != TSDB_CODE_SUCCESS) { if (pSql->res.code != TSDB_CODE_SUCCESS && pSql->res.code != TSDB_CODE_ACTION_IN_PROGRESS) {
*pCode = pSql->res.code; *pCode = pSql->res.code;
} }

142
src/inc/taoserror.h Normal file
View File

@ -0,0 +1,142 @@
/*
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
*
* This program is free software: you can use, redistribute, and/or modify
* it under the terms of the GNU Affero General Public License, version 3
* or later ("AGPL"), as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TDENGINE_TAOSERROR_H
#define TDENGINE_TAOSERROR_H
#ifdef __cplusplus
extern "C" {
#endif
#define TSDB_CODE_SUCCESS 0
#define TSDB_CODE_ACTION_IN_PROGRESS 1
#define TSDB_CODE_LAST_SESSION_NOT_FINISHED 5
#define TSDB_CODE_INVALID_SESSION_ID 6
#define TSDB_CODE_INVALID_TRAN_ID 7
#define TSDB_CODE_INVALID_MSG_TYPE 8
#define TSDB_CODE_ALREADY_PROCESSED 9
#define TSDB_CODE_AUTH_FAILURE 10
#define TSDB_CODE_WRONG_MSG_SIZE 11
#define TSDB_CODE_UNEXPECTED_RESPONSE 12
#define TSDB_CODE_INVALID_RESPONSE_TYPE 13
#define TSDB_CODE_NO_RESOURCE 14
#define TSDB_CODE_INVALID_TIME_STAMP 15
#define TSDB_CODE_MISMATCHED_METER_ID 16
#define TSDB_CODE_ACTION_TRANS_NOT_FINISHED 17
#define TSDB_CODE_ACTION_NOT_ONLINE 18
#define TSDB_CODE_ACTION_SEND_FAILD 19
#define TSDB_CODE_NOT_ACTIVE_SESSION 20
#define TSDB_CODE_INVALID_VNODE_ID 21
#define TSDB_CODE_APP_ERROR 22
#define TSDB_CODE_INVALID_IE 23
#define TSDB_CODE_INVALID_VALUE 24
#define TSDB_CODE_REDIRECT 25
#define TSDB_CODE_ALREADY_THERE 26
#define TSDB_CODE_INVALID_METER_ID 27
#define TSDB_CODE_INVALID_SQL 28
#define TSDB_CODE_NETWORK_UNAVAIL 29
#define TSDB_CODE_INVALID_MSG_LEN 30
#define TSDB_CODE_INVALID_DB 31
#define TSDB_CODE_INVALID_TABLE 32
#define TSDB_CODE_DB_ALREADY_EXIST 33
#define TSDB_CODE_TABLE_ALREADY_EXIST 34
#define TSDB_CODE_INVALID_USER 35
#define TSDB_CODE_INVALID_ACCT 36
#define TSDB_CODE_INVALID_PASS 37
#define TSDB_CODE_DB_NOT_SELECTED 38
#define TSDB_CODE_MEMORY_CORRUPTED 39
#define TSDB_CODE_USER_ALREADY_EXIST 40
#define TSDB_CODE_NO_RIGHTS 41
#define TSDB_CODE_DISCONNECTED 42
#define TSDB_CODE_NO_MASTER 43
#define TSDB_CODE_NOT_CONFIGURED 44
#define TSDB_CODE_INVALID_OPTION 45
#define TSDB_CODE_NODE_OFFLINE 46
#define TSDB_CODE_SYNC_REQUIRED 47
#define TSDB_CODE_NO_ENOUGH_DNODES 48
#define TSDB_CODE_UNSYNCED 49
#define TSDB_CODE_TOO_SLOW 50
#define TSDB_CODE_OTHERS 51
#define TSDB_CODE_NO_REMOVE_MASTER 52
#define TSDB_CODE_WRONG_SCHEMA 53
#define TSDB_CODE_NOT_ACTIVE_VNODE 54
#define TSDB_CODE_TOO_MANY_USERS 55
#define TSDB_CODE_TOO_MANY_DATABSES 56
#define TSDB_CODE_TOO_MANY_TABLES 57
#define TSDB_CODE_TOO_MANY_DNODES 58
#define TSDB_CODE_TOO_MANY_ACCTS 59
#define TSDB_CODE_ACCT_ALREADY_EXIST 60
#define TSDB_CODE_DNODE_ALREADY_EXIST 61
#define TSDB_CODE_SDB_ERROR 62
#define TSDB_CODE_METRICMETA_EXPIRED 63 // local cached metric-meta expired causes error in metric query
#define TSDB_CODE_NOT_READY 64 // peer is not ready to process data
#define TSDB_CODE_MAX_SESSIONS 65 // too many sessions
#define TSDB_CODE_MAX_CONNECTIONS 66 // too many connections
#define TSDB_CODE_SESSION_ALREADY_EXIST 67
#define TSDB_CODE_NO_QSUMMARY 68
#define TSDB_CODE_SERV_OUT_OF_MEMORY 69
#define TSDB_CODE_INVALID_QHANDLE 70
#define TSDB_CODE_RELATED_TABLES_EXIST 71
#define TSDB_CODE_MONITOR_DB_FORBEIDDEN 72
#define TSDB_CODE_VG_COMMITLOG_INIT_FAILED 73
#define TSDB_CODE_VG_INIT_FAILED 74
#define TSDB_CODE_DATA_ALREADY_IMPORTED 75
#define TSDB_CODE_OPS_NOT_SUPPORT 76
#define TSDB_CODE_INVALID_QUERY_ID 77
#define TSDB_CODE_INVALID_STREAM_ID 78
#define TSDB_CODE_INVALID_CONNECTION 79
#define TSDB_CODE_ACTION_NOT_BALANCED 80
#define TSDB_CODE_CLI_OUT_OF_MEMORY 81
#define TSDB_CODE_DATA_OVERFLOW 82
#define TSDB_CODE_QUERY_CANCELLED 83
#define TSDB_CODE_GRANT_TIMESERIES_LIMITED 84
#define TSDB_CODE_GRANT_EXPIRED 85
#define TSDB_CODE_CLI_NO_DISKSPACE 86
#define TSDB_CODE_FILE_CORRUPTED 87
#define TSDB_CODE_INVALID_CLIENT_VERSION 88
#define TSDB_CODE_INVALID_ACCT_PARAMETER 89
#define TSDB_CODE_NOT_ENOUGH_TIME_SERIES 90
#define TSDB_CODE_NO_WRITE_ACCESS 91
#define TSDB_CODE_NO_READ_ACCESS 92
#define TSDB_CODE_GRANT_DB_LIMITED 93
#define TSDB_CODE_GRANT_USER_LIMITED 94
#define TSDB_CODE_GRANT_CONN_LIMITED 95
#define TSDB_CODE_GRANT_STREAM_LIMITED 96
#define TSDB_CODE_GRANT_SPEED_LIMITED 97
#define TSDB_CODE_GRANT_STORAGE_LIMITED 98
#define TSDB_CODE_GRANT_QUERYTIME_LIMITED 99
#define TSDB_CODE_GRANT_ACCT_LIMITED 100
#define TSDB_CODE_GRANT_DNODE_LIMITED 101
#define TSDB_CODE_GRANT_CPU_LIMITED 102
#define TSDB_CODE_SESSION_NOT_READY 103 // table NOT in ready state
#define TSDB_CODE_BATCH_SIZE_TOO_BIG 104
#define TSDB_CODE_TIMESTAMP_OUT_OF_RANGE 105
#define TSDB_CODE_INVALID_QUERY_MSG 106 // failed to validate the sql expression msg by vnode
#define TSDB_CODE_CACHE_BLOCK_TS_DISORDERED 107 // time stamp in cache block is disordered
#define TSDB_CODE_FILE_BLOCK_TS_DISORDERED 108 // time stamp in file block is disordered
#define TSDB_CODE_INVALID_COMMIT_LOG 109 // commit log init failed
#define TSDB_CODE_SERVER_NO_SPACE 110
#define TSDB_CODE_NOT_SUPER_TABLE 111 // operation only available for super table
#define TSDB_CODE_DUPLICATE_TAGS 112 // tags value for join not unique
#define TSDB_CODE_INVALID_SUBMIT_MSG 113
#define TSDB_CODE_NOT_ACTIVE_TABLE 114
#define TSDB_CODE_INVALID_TABLE_ID 115
#ifdef __cplusplus
}
#endif
#endif //TDENGINE_TAOSERROR_H

View File

@ -21,121 +21,7 @@ extern "C" {
#endif #endif
#include "tsdb.h" #include "tsdb.h"
#include "taoserror.h"
#define TSDB_CODE_SUCCESS 0
#define TSDB_CODE_ACTION_IN_PROGRESS 1
#define TSDB_CODE_LAST_SESSION_NOT_FINISHED 5
#define TSDB_CODE_INVALID_SESSION_ID 6
#define TSDB_CODE_INVALID_TRAN_ID 7
#define TSDB_CODE_INVALID_MSG_TYPE 8
#define TSDB_CODE_ALREADY_PROCESSED 9
#define TSDB_CODE_AUTH_FAILURE 10
#define TSDB_CODE_WRONG_MSG_SIZE 11
#define TSDB_CODE_UNEXPECTED_RESPONSE 12
#define TSDB_CODE_INVALID_RESPONSE_TYPE 13
#define TSDB_CODE_NO_RESOURCE 14
#define TSDB_CODE_INVALID_TIME_STAMP 15
#define TSDB_CODE_MISMATCHED_METER_ID 16
#define TSDB_CODE_ACTION_TRANS_NOT_FINISHED 17
#define TSDB_CODE_ACTION_NOT_ONLINE 18
#define TSDB_CODE_ACTION_SEND_FAILD 19
#define TSDB_CODE_NOT_ACTIVE_SESSION 20
#define TSDB_CODE_INVALID_VNODE_ID 21
#define TSDB_CODE_APP_ERROR 22
#define TSDB_CODE_INVALID_IE 23
#define TSDB_CODE_INVALID_VALUE 24
#define TSDB_CODE_REDIRECT 25
#define TSDB_CODE_ALREADY_THERE 26
#define TSDB_CODE_INVALID_METER_ID 27
#define TSDB_CODE_INVALID_SQL 28
#define TSDB_CODE_NETWORK_UNAVAIL 29
#define TSDB_CODE_INVALID_MSG_LEN 30
#define TSDB_CODE_INVALID_DB 31
#define TSDB_CODE_INVALID_TABLE 32
#define TSDB_CODE_DB_ALREADY_EXIST 33
#define TSDB_CODE_TABLE_ALREADY_EXIST 34
#define TSDB_CODE_INVALID_USER 35
#define TSDB_CODE_INVALID_ACCT 36
#define TSDB_CODE_INVALID_PASS 37
#define TSDB_CODE_DB_NOT_SELECTED 38
#define TSDB_CODE_MEMORY_CORRUPTED 39
#define TSDB_CODE_USER_ALREADY_EXIST 40
#define TSDB_CODE_NO_RIGHTS 41
#define TSDB_CODE_DISCONNECTED 42
#define TSDB_CODE_NO_MASTER 43
#define TSDB_CODE_NOT_CONFIGURED 44
#define TSDB_CODE_INVALID_OPTION 45
#define TSDB_CODE_NODE_OFFLINE 46
#define TSDB_CODE_SYNC_REQUIRED 47
#define TSDB_CODE_NO_ENOUGH_DNODES 48
#define TSDB_CODE_UNSYNCED 49
#define TSDB_CODE_TOO_SLOW 50
#define TSDB_CODE_OTHERS 51
#define TSDB_CODE_NO_REMOVE_MASTER 52
#define TSDB_CODE_WRONG_SCHEMA 53
#define TSDB_CODE_NOT_ACTIVE_VNODE 54
#define TSDB_CODE_TOO_MANY_USERS 55
#define TSDB_CODE_TOO_MANY_DATABSES 56
#define TSDB_CODE_TOO_MANY_TABLES 57
#define TSDB_CODE_TOO_MANY_DNODES 58
#define TSDB_CODE_TOO_MANY_ACCTS 59
#define TSDB_CODE_ACCT_ALREADY_EXIST 60
#define TSDB_CODE_DNODE_ALREADY_EXIST 61
#define TSDB_CODE_SDB_ERROR 62
#define TSDB_CODE_METRICMETA_EXPIRED 63 // local cached metric-meta expired causes error in metric query
#define TSDB_CODE_NOT_READY 64 // peer is not ready to process data
#define TSDB_CODE_MAX_SESSIONS 65 // too many sessions
#define TSDB_CODE_MAX_CONNECTIONS 66 // too many connections
#define TSDB_CODE_SESSION_ALREADY_EXIST 67
#define TSDB_CODE_NO_QSUMMARY 68
#define TSDB_CODE_SERV_OUT_OF_MEMORY 69
#define TSDB_CODE_INVALID_QHANDLE 70
#define TSDB_CODE_RELATED_TABLES_EXIST 71
#define TSDB_CODE_MONITOR_DB_FORBEIDDEN 72
#define TSDB_CODE_VG_COMMITLOG_INIT_FAILED 73
#define TSDB_CODE_VG_INIT_FAILED 74
#define TSDB_CODE_DATA_ALREADY_IMPORTED 75
#define TSDB_CODE_OPS_NOT_SUPPORT 76
#define TSDB_CODE_INVALID_QUERY_ID 77
#define TSDB_CODE_INVALID_STREAM_ID 78
#define TSDB_CODE_INVALID_CONNECTION 79
#define TSDB_CODE_ACTION_NOT_BALANCED 80
#define TSDB_CODE_CLI_OUT_OF_MEMORY 81
#define TSDB_CODE_DATA_OVERFLOW 82
#define TSDB_CODE_QUERY_CANCELLED 83
#define TSDB_CODE_GRANT_TIMESERIES_LIMITED 84
#define TSDB_CODE_GRANT_EXPIRED 85
#define TSDB_CODE_CLI_NO_DISKSPACE 86
#define TSDB_CODE_FILE_CORRUPTED 87
#define TSDB_CODE_INVALID_CLIENT_VERSION 88
#define TSDB_CODE_INVALID_ACCT_PARAMETER 89
#define TSDB_CODE_NOT_ENOUGH_TIME_SERIES 90
#define TSDB_CODE_NO_WRITE_ACCESS 91
#define TSDB_CODE_NO_READ_ACCESS 92
#define TSDB_CODE_GRANT_DB_LIMITED 93
#define TSDB_CODE_GRANT_USER_LIMITED 94
#define TSDB_CODE_GRANT_CONN_LIMITED 95
#define TSDB_CODE_GRANT_STREAM_LIMITED 96
#define TSDB_CODE_GRANT_SPEED_LIMITED 97
#define TSDB_CODE_GRANT_STORAGE_LIMITED 98
#define TSDB_CODE_GRANT_QUERYTIME_LIMITED 99
#define TSDB_CODE_GRANT_ACCT_LIMITED 100
#define TSDB_CODE_GRANT_DNODE_LIMITED 101
#define TSDB_CODE_GRANT_CPU_LIMITED 102
#define TSDB_CODE_SESSION_NOT_READY 103 // table NOT in ready state
#define TSDB_CODE_BATCH_SIZE_TOO_BIG 104
#define TSDB_CODE_TIMESTAMP_OUT_OF_RANGE 105
#define TSDB_CODE_INVALID_QUERY_MSG 106 // failed to validate the sql expression msg by vnode
#define TSDB_CODE_CACHE_BLOCK_TS_DISORDERED 107 // time stamp in cache block is disordered
#define TSDB_CODE_FILE_BLOCK_TS_DISORDERED 108 // time stamp in file block is disordered
#define TSDB_CODE_INVALID_COMMIT_LOG 109 // commit log init failed
#define TSDB_CODE_SERVER_NO_SPACE 110
#define TSDB_CODE_NOT_SUPER_TABLE 111 //
#define TSDB_CODE_DUPLICATE_TAGS 112 // tags value for join not unique
#define TSDB_CODE_INVALID_SUBMIT_MSG 113
#define TSDB_CODE_NOT_ACTIVE_TABLE 114
#define TSDB_CODE_INVALID_TABLE_ID 115
// message type // message type
#define TSDB_MSG_TYPE_REG 1 #define TSDB_MSG_TYPE_REG 1

View File

@ -13,16 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <assert.h>
#include <regex.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define __USE_XOPEN #define __USE_XOPEN
#include <wchar.h>
#include "os.h" #include "os.h"
#include "shell.h" #include "shell.h"
#include "shellCommand.h" #include "shellCommand.h"

View File

@ -16,16 +16,6 @@
#define _XOPEN_SOURCE #define _XOPEN_SOURCE
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include <assert.h>
#include <pthread.h>
#include <regex.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <time.h>
#include "os.h" #include "os.h"
#include "shell.h" #include "shell.h"
#include "shellCommand.h" #include "shellCommand.h"

View File

@ -13,27 +13,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <argp.h>
#include <assert.h>
#include <assert.h>
#include <error.h>
#include <pwd.h>
#include <regex.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/time.h>
#include <sys/types.h>
#include <termios.h>
#include <time.h>
#include <unistd.h>
#include <wordexp.h>
#define __USE_XOPEN #define __USE_XOPEN
#include <wchar.h> #include "os.h"
#include "shell.h" #include "shell.h"
#include "shellCommand.h" #include "shellCommand.h"

View File

@ -13,13 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <locale.h>
#include <pthread.h>
#include <signal.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include "os.h" #include "os.h"
#include "shell.h" #include "shell.h"
#include "tsclient.h" #include "tsclient.h"

View File

@ -13,23 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <arpa/inet.h> #include "os.h"
#include <errno.h>
#include <fcntl.h>
#include <netdb.h>
#include <netinet/in.h>
#include <pthread.h>
#include <pthread.h>
#include <semaphore.h>
#include <signal.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/epoll.h>
#include <sys/socket.h>
#include <syslog.h>
#include <unistd.h>
#include "taosmsg.h" #include "taosmsg.h"
#include "tlog.h" #include "tlog.h"

View File

@ -23,6 +23,7 @@ extern "C" {
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <argp.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <assert.h> #include <assert.h>
#include <ctype.h> #include <ctype.h>
@ -31,6 +32,7 @@ extern "C" {
#include <errno.h> #include <errno.h>
#include <float.h> #include <float.h>
#include <ifaddrs.h> #include <ifaddrs.h>
#include <libgen.h>
#include <limits.h> #include <limits.h>
#include <locale.h> #include <locale.h>
#include <math.h> #include <math.h>
@ -41,9 +43,12 @@ extern "C" {
#include <netinet/udp.h> #include <netinet/udp.h>
#include <pthread.h> #include <pthread.h>
#include <pwd.h> #include <pwd.h>
#include <regex.h>
#include <semaphore.h> #include <semaphore.h>
#include <signal.h>
#include <stdarg.h> #include <stdarg.h>
#include <stdbool.h> #include <stdbool.h>
#include <stddef.h>
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>
#include <strings.h> #include <strings.h>
@ -55,7 +60,9 @@ extern "C" {
#include <sys/socket.h> #include <sys/socket.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/syscall.h> #include <sys/syscall.h>
#include <sys/statvfs.h>
#include <sys/time.h> #include <sys/time.h>
#include <sys/types.h>
#include <sys/uio.h> #include <sys/uio.h>
#include <sys/un.h> #include <sys/un.h>
#include <syslog.h> #include <syslog.h>
@ -65,6 +72,7 @@ extern "C" {
#include <wordexp.h> #include <wordexp.h>
#include <wctype.h> #include <wctype.h>
#define taosCloseSocket(x) \ #define taosCloseSocket(x) \
{ \ { \
if (VALIDFD(x)) { \ if (VALIDFD(x)) { \

View File

@ -13,14 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <pthread.h>
#include <semaphore.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include "os.h" #include "os.h"
#include "tlog.h" #include "tlog.h"
#include "tmempool.h" #include "tmempool.h"

View File

@ -13,10 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <netinet/in.h> #include "os.h"
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
void taosFreeMsgHdr(void *hdr) { void taosFreeMsgHdr(void *hdr) {
struct msghdr *msgHdr = (struct msghdr *)hdr; struct msghdr *msgHdr = (struct msghdr *)hdr;

View File

@ -13,16 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <assert.h>
#include <errno.h>
#include <pthread.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include "os.h" #include "os.h"
#include "shash.h" #include "shash.h"
#include "taosmsg.h" #include "taosmsg.h"
#include "tidpool.h" #include "tidpool.h"

View File

@ -13,15 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <errno.h>
#include <fcntl.h>
#include <pthread.h>
#include <semaphore.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "os.h" #include "os.h"
#include "taosmsg.h" #include "taosmsg.h"
#include "tlog.h" #include "tlog.h"

View File

@ -13,16 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <errno.h>
#include <fcntl.h>
#include <pthread.h>
#include <pthread.h>
#include <semaphore.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "os.h" #include "os.h"
#include "taosmsg.h" #include "taosmsg.h"
#include "tlog.h" #include "tlog.h"

View File

@ -13,15 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <errno.h>
#include <fcntl.h>
#include <pthread.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "os.h" #include "os.h"
#include "taosmsg.h" #include "taosmsg.h"
#include "thash.h" #include "thash.h"

View File

@ -13,13 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <pthread.h> #include "os.h"
#include <semaphore.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "tsdb.h" #include "tsdb.h"
#define MAX_STR_LEN 40 #define MAX_STR_LEN 40

View File

@ -13,19 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <arpa/inet.h> #include "os.h"
#include <errno.h>
#include <fcntl.h>
#include <libgen.h>
#include <pthread.h>
#include <semaphore.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "sdb.h" #include "sdb.h"
#include "sdbint.h" #include "sdbint.h"

View File

@ -20,11 +20,7 @@
extern "C" { extern "C" {
#endif #endif
#include <errno.h> #include "os.h"
#include <pthread.h>
#include <semaphore.h>
#include <syslog.h>
#include <stdint.h>
#include "sdb.h" #include "sdb.h"
#include "tglobalcfg.h" #include "tglobalcfg.h"
@ -34,7 +30,6 @@ extern "C" {
#include "tmempool.h" #include "tmempool.h"
#include "trpc.h" #include "trpc.h"
#include "tsdb.h" #include "tsdb.h"
#include "tsdb.h"
#include "tskiplist.h" #include "tskiplist.h"
#include "tsocket.h" #include "tsocket.h"
#include "ttime.h" #include "ttime.h"

View File

@ -20,9 +20,7 @@
extern "C" { extern "C" {
#endif #endif
#include <pthread.h> #include "os.h"
#include <semaphore.h>
#include <stdbool.h>
#include "dnodeSystem.h" #include "dnodeSystem.h"
#include "mgmt.h" #include "mgmt.h"

View File

@ -20,8 +20,6 @@
extern "C" { extern "C" {
#endif #endif
#include <stdint.h>
int mgmtInitRedirect(); int mgmtInitRedirect();
void mgmtCleanUpRedirect(); void mgmtCleanUpRedirect();

View File

@ -20,11 +20,7 @@
extern "C" { extern "C" {
#endif #endif
#include <errno.h> #include "os.h"
#include <pthread.h>
#include <semaphore.h>
#include <stdint.h>
#include <syslog.h>
#include "tglobalcfg.h" #include "tglobalcfg.h"
#include "tidpool.h" #include "tidpool.h"
@ -33,7 +29,6 @@ extern "C" {
#include "trpc.h" #include "trpc.h"
#include "tsclient.h" #include "tsclient.h"
#include "tsdb.h" #include "tsdb.h"
#include "tsdb.h"
#include "tsocket.h" #include "tsocket.h"
#include "ttime.h" #include "ttime.h"
#include "ttimer.h" #include "ttimer.h"

View File

@ -16,7 +16,7 @@
#ifndef TDENGINE_VNODEPEER_H #ifndef TDENGINE_VNODEPEER_H
#define TDENGINE_VNODEPEER_H #define TDENGINE_VNODEPEER_H
#include <stdint.h> #include "os.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@ -20,8 +20,7 @@
extern "C" { extern "C" {
#endif #endif
#include <stdio.h> #include "os.h"
#include <stdlib.h>
#include "ihash.h" #include "ihash.h"

View File

@ -20,7 +20,7 @@
extern "C" { extern "C" {
#endif #endif
#include <stdint.h> #include "os.h"
#include "tinterpolation.h" #include "tinterpolation.h"
#include "vnodeTagMgmt.h" #include "vnodeTagMgmt.h"

View File

@ -20,7 +20,7 @@
extern "C" { extern "C" {
#endif #endif
#include <stdint.h> #include "os.h"
typedef struct { typedef struct {
int sid; int sid;

View File

@ -16,8 +16,6 @@
#ifndef TDENGINE_VNODESTORE_H #ifndef TDENGINE_VNODESTORE_H
#define TDENGINE_VNODESTORE_H #define TDENGINE_VNODESTORE_H
#include <stdbool.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif

View File

@ -16,8 +16,6 @@
#ifndef TDENGINE_VNODESYSTEM_H #ifndef TDENGINE_VNODESYSTEM_H
#define TDENGINE_VNODESYSTEM_H #define TDENGINE_VNODESYSTEM_H
#include <stdbool.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif

View File

@ -14,9 +14,8 @@
*/ */
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include <arpa/inet.h>
#include <assert.h> #include "os.h"
#include <unistd.h>
#include "dnodeSystem.h" #include "dnodeSystem.h"
#include "taosmsg.h" #include "taosmsg.h"

View File

@ -14,20 +14,8 @@
*/ */
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include <errno.h>
#include <fcntl.h> #include "os.h"
#include <locale.h>
#include <pthread.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <syslog.h>
#include <unistd.h>
#include <unistd.h>
#include <wordexp.h>
#include "dnodeSystem.h" #include "dnodeSystem.h"
#include "tglobalcfg.h" #include "tglobalcfg.h"

View File

@ -14,11 +14,7 @@
*/ */
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include <pthread.h> #include "os.h"
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include "mgmt.h" #include "mgmt.h"
#include "vnode.h" #include "vnode.h"

View File

@ -14,7 +14,7 @@
*/ */
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include <arpa/inet.h> #include "os.h"
#include "mgmt.h" #include "mgmt.h"
#include "tschemautil.h" #include "tschemautil.h"

View File

@ -14,8 +14,10 @@
*/ */
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include "os.h"
#include "mgmt.h" #include "mgmt.h"
#include <arpa/inet.h>
#include "taosmsg.h" #include "taosmsg.h"
#include "tschemautil.h" #include "tschemautil.h"

View File

@ -15,9 +15,7 @@
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include <arpa/inet.h> #include "os.h"
#include <endian.h>
#include <stdbool.h>
#include "dnodeSystem.h" #include "dnodeSystem.h"
#include "mgmt.h" #include "mgmt.h"

View File

@ -14,8 +14,7 @@
*/ */
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include <arpa/inet.h> #include "os.h"
#include <endian.h>
#include "dnodeSystem.h" #include "dnodeSystem.h"
#include "mgmt.h" #include "mgmt.h"

View File

@ -14,10 +14,7 @@
*/ */
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include <arpa/inet.h> #include "os.h"
#include <assert.h>
#include <limits.h>
#include <stdint.h>
#include "mgmt.h" #include "mgmt.h"
#include "mgmtUtil.h" #include "mgmtUtil.h"

View File

@ -14,8 +14,9 @@
*/ */
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include "os.h"
#include "mgmt.h" #include "mgmt.h"
#include <arpa/inet.h>
#include "mgmtProfile.h" #include "mgmtProfile.h"
#include "taosmsg.h" #include "taosmsg.h"
#include "tschemautil.h" #include "tschemautil.h"

View File

@ -14,7 +14,7 @@
*/ */
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include <arpa/inet.h> #include "os.h"
#include "dnodeSystem.h" #include "dnodeSystem.h"
#include "mgmt.h" #include "mgmt.h"

View File

@ -14,10 +14,7 @@
*/ */
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include <arpa/inet.h> #include "os.h"
#include <float.h>
#include <math.h>
#include <sys/time.h>
#include "mgmt.h" #include "mgmt.h"
#include "mgmtUtil.h" #include "mgmtUtil.h"

View File

@ -14,16 +14,7 @@
*/ */
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include <arpa/inet.h> #include "os.h"
#include <netinet/in.h>
#include <pwd.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <syslog.h>
#include <unistd.h>
#include "dnodeSystem.h" #include "dnodeSystem.h"
#include "mgmt.h" #include "mgmt.h"

View File

@ -14,7 +14,7 @@
*/ */
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include <arpa/inet.h> #include "os.h"
#include "mgmt.h" #include "mgmt.h"
#include "tschemautil.h" #include "tschemautil.h"

View File

@ -14,10 +14,7 @@
*/ */
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include <arpa/inet.h> #include "os.h"
#include <sys/time.h>
#include <math.h>
#include <float.h>
#include "mgmt.h" #include "mgmt.h"
#include "mgmtUtil.h" #include "mgmtUtil.h"

View File

@ -14,7 +14,7 @@
*/ */
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include <arpa/inet.h> #include "os.h"
#include "mgmt.h" #include "mgmt.h"
#include "tschemautil.h" #include "tschemautil.h"

View File

@ -14,9 +14,7 @@
*/ */
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include <arpa/inet.h> #include "os.h"
#include <sys/time.h>
#include <unistd.h>
#include "taosmsg.h" #include "taosmsg.h"
#include "vnode.h" #include "vnode.h"

View File

@ -14,15 +14,7 @@
*/ */
#define _GNU_SOURCE /* See feature_test_macros(7) */ #define _GNU_SOURCE /* See feature_test_macros(7) */
#include <fcntl.h> #include "os.h"
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "tsdb.h" #include "tsdb.h"
#include "vnode.h" #include "vnode.h"

View File

@ -14,15 +14,7 @@
*/ */
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include <arpa/inet.h> #include "os.h"
#include <assert.h>
#include <fcntl.h>
#include <libgen.h>
#include <sys/stat.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include "tscompression.h" #include "tscompression.h"
#include "tutil.h" #include "tutil.h"
@ -216,6 +208,7 @@ int vnodeOpenCommitFiles(SVnodeObj *pVnode, int noTempLast) {
if (numOfFiles >= pVnode->numOfFiles) { if (numOfFiles >= pVnode->numOfFiles) {
// create empty header files backward // create empty header files backward
filesAdded = numOfFiles - pVnode->numOfFiles + 1; filesAdded = numOfFiles - pVnode->numOfFiles + 1;
assert(filesAdded <= pVnode->maxFiles + 2);
for (int i = 0; i < filesAdded; ++i) { for (int i = 0; i < filesAdded; ++i) {
fileId = pVnode->fileId - pVnode->numOfFiles - i; fileId = pVnode->fileId - pVnode->numOfFiles - i;
if (vnodeCreateEmptyCompFile(vnode, fileId) < 0) if (vnodeCreateEmptyCompFile(vnode, fileId) < 0)

View File

@ -14,11 +14,7 @@
*/ */
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include <stdlib.h> #include "os.h"
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "vnode.h" #include "vnode.h"

View File

@ -14,11 +14,7 @@
*/ */
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include <float.h> #include "os.h"
#include <math.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "taosmsg.h" #include "taosmsg.h"
#include "tsqlfunction.h" #include "tsqlfunction.h"

View File

@ -14,10 +14,7 @@
*/ */
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include <arpa/inet.h> #include "os.h"
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "trpc.h" #include "trpc.h"
#include "ttimer.h" #include "ttimer.h"

View File

@ -14,10 +14,7 @@
*/ */
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include <arpa/inet.h> #include "os.h"
#include <assert.h>
#include <sys/stat.h>
#include <sys/types.h>
#include "trpc.h" #include "trpc.h"
#include "tschemautil.h" #include "tschemautil.h"

View File

@ -14,10 +14,7 @@
*/ */
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include <assert.h> #include "os.h"
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include "taosmsg.h" #include "taosmsg.h"
#include "textbuffer.h" #include "textbuffer.h"

View File

@ -14,12 +14,7 @@
*/ */
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include <arpa/inet.h> #include "os.h"
#include <assert.h>
#include <fcntl.h>
#include <limits.h>
#include <time.h>
#include <unistd.h>
#include "ihash.h" #include "ihash.h"
#include "taosmsg.h" #include "taosmsg.h"

View File

@ -14,10 +14,8 @@
*/ */
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include <arpa/inet.h> #include "os.h"
#include <assert.h>
#include <endian.h>
#include <stdint.h>
#include "taosmsg.h" #include "taosmsg.h"
#include "vnode.h" #include "vnode.h"
#include "vnodeShell.h" #include "vnodeShell.h"

View File

@ -14,11 +14,7 @@
*/ */
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include <dirent.h> #include "os.h"
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "dnodeSystem.h" #include "dnodeSystem.h"
#include "trpc.h" #include "trpc.h"

View File

@ -14,15 +14,7 @@
*/ */
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include <pthread.h> #include "os.h"
#include <pwd.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <syslog.h>
#include <unistd.h>
#include "tsdb.h" #include "tsdb.h"
#include "tsocket.h" #include "tsocket.h"

View File

@ -14,9 +14,7 @@
*/ */
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include <assert.h> #include "os.h"
#include <stdbool.h>
#include <stdlib.h>
#include "tsdb.h" #include "tsdb.h"
#include "tlog.h" #include "tlog.h"

View File

@ -14,10 +14,7 @@
*/ */
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include <arpa/inet.h> #include "os.h"
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include "tast.h" #include "tast.h"
#include "tscUtil.h" #include "tscUtil.h"

View File

@ -13,13 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <pthread.h>
#include <semaphore.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "os.h" #include "os.h"
typedef struct _str_node_t { typedef struct _str_node_t {

View File

@ -13,15 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <stdbool.h> #include "os.h"
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <pthread.h>
#include <string.h>
#include "tcache.h" #include "tcache.h"
#include "tlog.h" #include "tlog.h"

View File

@ -46,12 +46,6 @@
* of the XORed value with informations. If not, record the first corresponding bytes. * of the XORed value with informations. If not, record the first corresponding bytes.
* *
*/ */
#include <assert.h>
#include <limits.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "os.h" #include "os.h"
#include "lz4.h" #include "lz4.h"

View File

@ -13,17 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <float.h>
#include <math.h>
#include <errno.h>
#include "os.h" #include "os.h"
#include "taos.h" #include "taos.h"
#include "taosmsg.h" #include "taosmsg.h"

View File

@ -13,13 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <pthread.h>
#include <semaphore.h>
#include <signal.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "os.h" #include "os.h"
#include "tmempool.h" #include "tmempool.h"

View File

@ -13,13 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <assert.h> #include "os.h"
#include <float.h>
#include <math.h>
#include <memory.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include "taosmsg.h" #include "taosmsg.h"
#include "thistogram.h" #include "thistogram.h"

View File

@ -13,10 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <pthread.h> #include "os.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "tlog.h" #include "tlog.h"
typedef struct { typedef struct {

View File

@ -13,22 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <pthread.h>
#include <semaphore.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/types.h>
#include <time.h>
#include "os.h" #include "os.h"
#include "tlog.h" #include "tlog.h"
#include "tutil.h" #include "tutil.h"

View File

@ -13,13 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <assert.h> #include "os.h"
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <errno.h>
#include "tlog.h" #include "tlog.h"
extern int32_t taosGetTimestampSec(); extern int32_t taosGetTimestampSec();

View File

@ -13,12 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <errno.h>
#include <pthread.h>
#include <semaphore.h>
#include <signal.h>
#include <stdio.h>
#include "os.h" #include "os.h"
#include "tmodule.h" #include "tmodule.h"
#include "tutil.h" #include "tutil.h"

View File

@ -13,14 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <errno.h>
#include <pthread.h>
#include <semaphore.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "os.h" #include "os.h"
#include "tlog.h" #include "tlog.h"
#include "tsched.h" #include "tsched.h"

View File

@ -13,17 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <fcntl.h>
#include <pthread.h>
#include <stdarg.h>
#include <sys/types.h>
#include "os.h" #include "os.h"
#include "tglobalcfg.h" #include "tglobalcfg.h"
#include "tlog.h" #include "tlog.h"

View File

@ -13,12 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <assert.h>
#include <errno.h>
#include <pthread.h>
#include <sched.h>
#include <stdio.h>
#include <stdlib.h>
#include "os.h" #include "os.h"
#include "tlog.h" #include "tlog.h"
#include "tsched.h" #include "tsched.h"

View File

@ -13,15 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <assert.h>
#include <errno.h>
#include <float.h>
#include <math.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "os.h" #include "os.h"
#include "taos.h" #include "taos.h"
#include "tsdb.h" #include "tsdb.h"

View File

@ -13,14 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <assert.h>
#include <locale.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#include <errno.h>
#include "os.h" #include "os.h"
#ifdef USE_LIBICONV #ifdef USE_LIBICONV