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_QUEUE_TYPE;
|
||||
|
||||
#define SLOW_LOG_SEND_SIZE_MAX 128*1024*1024
|
||||
#define SLOW_LOG_SEND_SIZE_MAX 1024*1024
|
||||
|
||||
typedef struct {
|
||||
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){
|
||||
uDebug("[monitor] readFile slow begin pFile:%p, offset:%"PRId64 ", size:%"PRId64, pFile, *offset, size);
|
||||
if(taosLSeekFile(pFile, *offset, SEEK_SET) < 0){
|
||||
uError("failed to seek file:%p code: %d", pFile, errno);
|
||||
return NULL;
|
||||
|
@ -427,7 +428,7 @@ static char* readFile(TdFilePtr pFile, int64_t *offset, int64_t size){
|
|||
*offset += (len+1);
|
||||
}
|
||||
|
||||
uDebug("[monitor] readFile slow log:%s", pCont);
|
||||
uDebug("[monitor] readFile slow log end, data:%s, offset:%"PRId64, pCont, *offset);
|
||||
return pCont;
|
||||
}
|
||||
|
||||
|
|
|
@ -173,7 +173,7 @@ TEST(clientMonitorTest, ReadOneFile) {
|
|||
break;
|
||||
}
|
||||
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};
|
||||
|
|
Loading…
Reference in New Issue