Merge branch '3.0' of https://github.com/taosdata/TDengine into refact/tsdb_optimize
This commit is contained in:
commit
2e827b50e2
|
@ -32,7 +32,7 @@ taos> show databases;
|
|||
Query OK, 2 rows in database (0.033802s)
|
||||
```
|
||||
|
||||
因为运行在容器中的 TDengine 服务端使用容器的 hostname 建立连接,使用 taos shell 或者各种连接器(例如 JDBC-JNI)从容器外访问容器内的 TDengine 比较复杂,所以上述方式是访问容器中 TDengine 服务的最简单的方法,适用于一些简单场景。如果在一些复杂场景下想要从容器化使用 taos shell 或者各种连接器访问容器中的 TDengine 服务,请参考下一节。
|
||||
因为运行在容器中的 TDengine 服务端使用容器的 hostname 建立连接,使用 TDengine CLI 或者各种连接器(例如 JDBC-JNI)从容器外访问容器内的 TDengine 比较复杂,所以上述方式是访问容器中 TDengine 服务的最简单的方法,适用于一些简单场景。如果在一些复杂场景下想要从容器化使用 taos shell 或者各种连接器访问容器中的 TDengine 服务,请参考下一节。
|
||||
|
||||
## 在 host 网络上启动 TDengine
|
||||
|
||||
|
|
|
@ -79,6 +79,7 @@ extern "C" {
|
|||
#include <wchar.h>
|
||||
#include <wctype.h>
|
||||
|
||||
#include "taoserror.h"
|
||||
#include "osAtomic.h"
|
||||
#include "osDef.h"
|
||||
#include "osDir.h"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ $1 -eq "abort-upgrade" ]; then
|
||||
if [ "$1"x = "abort-upgrade"x ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
|
|
@ -381,8 +381,7 @@ function install_header() {
|
|||
${install_main_dir}/include ||
|
||||
${csudo}cp -f ${source_dir}/include/client/taos.h ${source_dir}/include/common/taosdef.h ${source_dir}/include/util/taoserror.h ${source_dir}/include/libs/function/taosudf.h \
|
||||
${install_main_2_dir}/include &&
|
||||
${csudo}chmod 644 ${install_main_dir}/include/* ||:
|
||||
${csudo}chmod 644 ${install_main_2_dir}/include/*
|
||||
${csudo}chmod 644 ${install_main_dir}/include/* || ${csudo}chmod 644 ${install_main_2_dir}/include/*
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
@ -133,6 +133,7 @@ int32_t taosMulMkDir(const char *dirname) {
|
|||
code = mkdir(temp, 0755);
|
||||
#endif
|
||||
if (code < 0 && errno != EEXIST) {
|
||||
terrno = TAOS_SYSTEM_ERROR(errno);
|
||||
return code;
|
||||
}
|
||||
*pos = TD_DIRSEP[0];
|
||||
|
@ -146,6 +147,7 @@ int32_t taosMulMkDir(const char *dirname) {
|
|||
code = mkdir(temp, 0755);
|
||||
#endif
|
||||
if (code < 0 && errno != EEXIST) {
|
||||
terrno = TAOS_SYSTEM_ERROR(errno);
|
||||
return code;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -313,6 +313,7 @@ TdFilePtr taosOpenFile(const char *path, int32_t tdFileOptions) {
|
|||
assert(!(tdFileOptions & TD_FILE_EXCL));
|
||||
fp = fopen(path, mode);
|
||||
if (fp == NULL) {
|
||||
terrno = TAOS_SYSTEM_ERROR(errno);
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
|
@ -335,6 +336,7 @@ TdFilePtr taosOpenFile(const char *path, int32_t tdFileOptions) {
|
|||
fd = open(path, access, S_IRWXU | S_IRWXG | S_IRWXO);
|
||||
#endif
|
||||
if (fd == -1) {
|
||||
terrno = TAOS_SYSTEM_ERROR(errno);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -595,6 +595,7 @@ int32_t taosGetDiskSize(char *dataDir, SDiskSize *diskSize) {
|
|||
#else
|
||||
struct statvfs info;
|
||||
if (statvfs(dataDir, &info)) {
|
||||
terrno = TAOS_SYSTEM_ERROR(errno);
|
||||
return -1;
|
||||
} else {
|
||||
diskSize->total = info.f_blocks * info.f_frsize;
|
||||
|
|
|
@ -429,7 +429,7 @@ static inline int32_t taosBuildLogHead(char *buffer, const char *flags) {
|
|||
}
|
||||
|
||||
static inline void taosPrintLogImp(ELogLevel level, int32_t dflag, const char *buffer, int32_t len) {
|
||||
if ((dflag & DEBUG_FILE) && tsLogObj.logHandle && tsLogObj.logHandle->pFile != NULL) {
|
||||
if ((dflag & DEBUG_FILE) && tsLogObj.logHandle && tsLogObj.logHandle->pFile != NULL && osLogSpaceAvailable()) {
|
||||
taosUpdateLogNums(level);
|
||||
if (tsAsyncLog) {
|
||||
taosPushLogBuffer(tsLogObj.logHandle, buffer, len);
|
||||
|
@ -451,7 +451,6 @@ static inline void taosPrintLogImp(ELogLevel level, int32_t dflag, const char *b
|
|||
}
|
||||
|
||||
void taosPrintLog(const char *flags, ELogLevel level, int32_t dflag, const char *format, ...) {
|
||||
if (!osLogSpaceAvailable()) return;
|
||||
if (!(dflag & DEBUG_FILE) && !(dflag & DEBUG_SCREEN)) return;
|
||||
|
||||
char buffer[LOG_MAX_LINE_BUFFER_SIZE];
|
||||
|
|
Loading…
Reference in New Issue