未验证 提交 20e3b5a2 编写于 作者: H Hongze Cheng 提交者: GitHub

Revert "[feature]<TD-4700>: implement feature TD-4700"

上级 ae3ce9c1
......@@ -96,7 +96,6 @@ static SLogBuff *taosLogBuffNew(int32_t bufSize);
static void taosCloseLogByFd(int32_t oldFd);
static int32_t taosOpenLogFile(char *fn, int32_t maxLines, int32_t maxFileNum);
extern void taosPrintGlobalCfg();
static volatile int8_t tsNoDisk = 0;
static int32_t taosStartLog() {
pthread_attr_t threadAttr;
......@@ -366,17 +365,9 @@ static int32_t taosOpenLogFile(char *fn, int32_t maxLines, int32_t maxFileNum) {
void taosPrintLog(const char *flags, int32_t dflag, const char *format, ...) {
if (tsTotalLogDirGB != 0 && tsAvailLogDirGB < tsMinimalLogDirGB) {
char buf[256] = "\0";
sprintf(buf, "server disk:%s space remain %.3f GB, total %.1f GB, stop print log.\n", tsLogDir, tsAvailLogDirGB,
tsTotalLogDirGB);
if (atomic_val_compare_exchange_8(&tsNoDisk, 0, 1) == 1) {
taosWrite(tsLogObj.logHandle->fd, buf, (uint32_t)strlen(buf));
}
puts(buf);
printf("server disk:%s space remain %.3f GB, total %.1f GB, stop print log.\n", tsLogDir, tsAvailLogDirGB, tsTotalLogDirGB);
fflush(stdout);
return;
} else {
atomic_store_8(&tsNoDisk, 0);
}
va_list argpointer;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册