提交 8318a609 编写于 作者: S slguan

fix issue #543

上级 e295516e
...@@ -330,7 +330,7 @@ char *tprefix(char *prefix) { ...@@ -330,7 +330,7 @@ char *tprefix(char *prefix) {
void tprintf(const char *const flags, int dflag, const char *const format, ...) { void tprintf(const char *const flags, int dflag, const char *const format, ...) {
if (tsTotalLogDirGB != 0 && tsAvailLogDirGB < tsMinimalLogDirGB) { if (tsTotalLogDirGB != 0 && tsAvailLogDirGB < tsMinimalLogDirGB) {
printf("server disk space remain %.3f GB, stop write log\n", tsAvailLogDirGB); printf("server disk:%s space remain %.3f GB, total %.1f GB, stop print log.\n", logDir, tsAvailLogDirGB, tsTotalLogDirGB);
fflush(stdout); fflush(stdout);
return; return;
} }
...@@ -392,7 +392,7 @@ void tprintf(const char *const flags, int dflag, const char *const format, ...) ...@@ -392,7 +392,7 @@ void tprintf(const char *const flags, int dflag, const char *const format, ...)
void taosDumpData(unsigned char *msg, int len) { void taosDumpData(unsigned char *msg, int len) {
if (tsTotalLogDirGB != 0 && tsAvailLogDirGB < tsMinimalLogDirGB) { if (tsTotalLogDirGB != 0 && tsAvailLogDirGB < tsMinimalLogDirGB) {
printf("server disk space remain %.3f GB, stop write log\n", tsAvailLogDirGB); printf("server disk:%s space remain %.3f GB, total %.1f GB, stop dump log.\n", logDir, tsAvailLogDirGB, tsTotalLogDirGB);
fflush(stdout); fflush(stdout);
return; return;
} }
...@@ -421,7 +421,7 @@ void taosDumpData(unsigned char *msg, int len) { ...@@ -421,7 +421,7 @@ void taosDumpData(unsigned char *msg, int len) {
void taosPrintLongString(const char *const flags, int dflag, const char *const format, ...) { void taosPrintLongString(const char *const flags, int dflag, const char *const format, ...) {
if (tsTotalLogDirGB != 0 && tsAvailLogDirGB < tsMinimalLogDirGB) { if (tsTotalLogDirGB != 0 && tsAvailLogDirGB < tsMinimalLogDirGB) {
printf("server disk space remain %.3f GB, stop write log\n", tsAvailLogDirGB); printf("server disk:%s space remain %.3f GB, total %.1f GB, stop write log.\n", logDir, tsAvailLogDirGB, tsTotalLogDirGB);
fflush(stdout); fflush(stdout);
return; return;
} }
......
...@@ -321,7 +321,7 @@ bool taosGetDisk() { ...@@ -321,7 +321,7 @@ bool taosGetDisk() {
const double unit = 1024 * 1024 * 1024; const double unit = 1024 * 1024 * 1024;
if (tscEmbedded) { if (tscEmbedded) {
if (statvfs(tsDirectory, &info)) { if (statvfs(dataDir, &info)) {
tsTotalDataDirGB = 0; tsTotalDataDirGB = 0;
tsAvailDataDirGB = 0; tsAvailDataDirGB = 0;
return false; return false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册