Merge pull request #6888 from taosdata/revert-6540-feature/TD-4700
Revert "[feature]<TD-4700>: implement feature TD-4700"
This commit is contained in:
commit
09698c156b
|
@ -96,7 +96,6 @@ static SLogBuff *taosLogBuffNew(int32_t bufSize);
|
||||||
static void taosCloseLogByFd(int32_t oldFd);
|
static void taosCloseLogByFd(int32_t oldFd);
|
||||||
static int32_t taosOpenLogFile(char *fn, int32_t maxLines, int32_t maxFileNum);
|
static int32_t taosOpenLogFile(char *fn, int32_t maxLines, int32_t maxFileNum);
|
||||||
extern void taosPrintGlobalCfg();
|
extern void taosPrintGlobalCfg();
|
||||||
static volatile int8_t tsNoDisk = 0;
|
|
||||||
|
|
||||||
static int32_t taosStartLog() {
|
static int32_t taosStartLog() {
|
||||||
pthread_attr_t threadAttr;
|
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, ...) {
|
void taosPrintLog(const char *flags, int32_t dflag, const char *format, ...) {
|
||||||
if (tsTotalLogDirGB != 0 && tsAvailLogDirGB < tsMinimalLogDirGB) {
|
if (tsTotalLogDirGB != 0 && tsAvailLogDirGB < tsMinimalLogDirGB) {
|
||||||
char buf[256] = "\0";
|
printf("server disk:%s space remain %.3f GB, total %.1f GB, stop print log.\n", tsLogDir, tsAvailLogDirGB, tsTotalLogDirGB);
|
||||||
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);
|
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
return;
|
return;
|
||||||
} else {
|
|
||||||
atomic_store_8(&tsNoDisk, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
va_list argpointer;
|
va_list argpointer;
|
||||||
|
|
Loading…
Reference in New Issue