commit
fb92f93f11
|
@ -41,7 +41,7 @@ static int32_t mgmtRetrieveDnodes(SShowObj *pShow, char *data, int32_t rows, voi
|
||||||
extern int32_t clusterInit();
|
extern int32_t clusterInit();
|
||||||
extern void clusterCleanUp();
|
extern void clusterCleanUp();
|
||||||
extern int32_t clusterGetDnodesNum();
|
extern int32_t clusterGetDnodesNum();
|
||||||
extern void * clusterGetNextDnode(void *pNode, void **pDnode);
|
extern void * clusterGetNextDnode(void *pNode, SDnodeObj **pDnode);
|
||||||
extern void clusterIncDnodeRef(SDnodeObj *pDnode);
|
extern void clusterIncDnodeRef(SDnodeObj *pDnode);
|
||||||
extern void clusterDecDnodeRef(SDnodeObj *pDnode);
|
extern void clusterDecDnodeRef(SDnodeObj *pDnode);
|
||||||
extern SDnodeObj* clusterGetDnode(int32_t dnodeId);
|
extern SDnodeObj* clusterGetDnode(int32_t dnodeId);
|
||||||
|
|
|
@ -126,7 +126,7 @@ int taosUpdateIdPool(id_pool_t *handle, int maxId) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int *idList = calloc(maxId, sizeof(bool));
|
bool *idList = calloc(maxId, sizeof(bool));
|
||||||
if (idList == NULL) {
|
if (idList == NULL) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -137,7 +137,7 @@ int taosUpdateIdPool(id_pool_t *handle, int maxId) {
|
||||||
pIdPool->numOfFree += (maxId - pIdPool->maxId);
|
pIdPool->numOfFree += (maxId - pIdPool->maxId);
|
||||||
pIdPool->maxId = maxId;
|
pIdPool->maxId = maxId;
|
||||||
|
|
||||||
int *oldIdList = pIdPool->freeList;
|
bool *oldIdList = pIdPool->freeList;
|
||||||
pIdPool->freeList = idList;
|
pIdPool->freeList = idList;
|
||||||
free(oldIdList);
|
free(oldIdList);
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,7 @@ void taosUnLockNote(int fd, taosNoteInfo * pNote)
|
||||||
|
|
||||||
void *taosThreadToOpenNewNote(void *param)
|
void *taosThreadToOpenNewNote(void *param)
|
||||||
{
|
{
|
||||||
char name[NOTE_FILE_NAME_LEN];
|
char name[NOTE_FILE_NAME_LEN * 2];
|
||||||
taosNoteInfo * pNote = (taosNoteInfo *)param;
|
taosNoteInfo * pNote = (taosNoteInfo *)param;
|
||||||
|
|
||||||
pNote->taosNoteFlag ^= 1;
|
pNote->taosNoteFlag ^= 1;
|
||||||
|
@ -170,7 +170,7 @@ void taosGetNoteName(char *fn, taosNoteInfo * pNote)
|
||||||
|
|
||||||
int taosOpenNoteWithMaxLines(char *fn, int maxLines, int maxNoteNum, taosNoteInfo * pNote)
|
int taosOpenNoteWithMaxLines(char *fn, int maxLines, int maxNoteNum, taosNoteInfo * pNote)
|
||||||
{
|
{
|
||||||
char name[NOTE_FILE_NAME_LEN] = "\0";
|
char name[NOTE_FILE_NAME_LEN * 2] = "\0";
|
||||||
struct stat notestat0, notestat1;
|
struct stat notestat0, notestat1;
|
||||||
int size;
|
int size;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue