fix:compile error in windows & modify the size of send max
This commit is contained in:
parent
44d81eab56
commit
f593b644fc
|
@ -38,7 +38,7 @@ typedef enum {
|
||||||
SLOW_LOG_READ_QUIT = 3,
|
SLOW_LOG_READ_QUIT = 3,
|
||||||
} SLOW_LOG_QUEUE_TYPE;
|
} SLOW_LOG_QUEUE_TYPE;
|
||||||
|
|
||||||
#define SLOW_LOG_SEND_SIZE_MAX 128*1024*1024
|
#define SLOW_LOG_SEND_SIZE_MAX 1024*1024
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int64_t clusterId;
|
int64_t clusterId;
|
||||||
|
|
|
@ -382,6 +382,7 @@ static void monitorWriteSlowLog2File(MonitorSlowLogData* slowLogData, char *tmpP
|
||||||
}
|
}
|
||||||
|
|
||||||
static char* readFile(TdFilePtr pFile, int64_t *offset, int64_t size){
|
static char* readFile(TdFilePtr pFile, int64_t *offset, int64_t size){
|
||||||
|
uDebug("[monitor] readFile slow begin pFile:%p, offset:%"PRId64 ", size:%"PRId64, pFile, *offset, size);
|
||||||
if(taosLSeekFile(pFile, *offset, SEEK_SET) < 0){
|
if(taosLSeekFile(pFile, *offset, SEEK_SET) < 0){
|
||||||
uError("failed to seek file:%p code: %d", pFile, errno);
|
uError("failed to seek file:%p code: %d", pFile, errno);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -427,7 +428,7 @@ static char* readFile(TdFilePtr pFile, int64_t *offset, int64_t size){
|
||||||
*offset += (len+1);
|
*offset += (len+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
uDebug("[monitor] readFile slow log:%s", pCont);
|
uDebug("[monitor] readFile slow log end, data:%s, offset:%"PRId64, pCont, *offset);
|
||||||
return pCont;
|
return pCont;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -173,7 +173,7 @@ TEST(clientMonitorTest, ReadOneFile) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
char* val = readFile(pFile, &offset, fileSize);
|
char* val = readFile(pFile, &offset, fileSize);
|
||||||
printf("offset:%" PRId64",fileSize:%"PRId64",val:%s\n", offset, fileSize, val);
|
printf("offset:%lld,fileSize:%lld,val:%s\n", offset, fileSize, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
// char value[size] = {0};
|
// char value[size] = {0};
|
||||||
|
|
Loading…
Reference in New Issue