fix conflict
This commit is contained in:
parent
c17139097a
commit
c43570e215
|
@ -151,7 +151,6 @@ SFileGroup *tsdbCreateFGroup(STsdbRepo *pRepo, int fid, int level) {
|
||||||
// SET FILE GROUP
|
// SET FILE GROUP
|
||||||
fg.fileId = fid;
|
fg.fileId = fid;
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
// CREATE FILES
|
// CREATE FILES
|
||||||
for (int type = 0; type < TSDB_FILE_TYPE_MAX; type++) {
|
for (int type = 0; type < TSDB_FILE_TYPE_MAX; type++) {
|
||||||
SFile *pFile = &(fg.files[type]);
|
SFile *pFile = &(fg.files[type]);
|
||||||
|
@ -168,19 +167,6 @@ SFileGroup *tsdbCreateFGroup(STsdbRepo *pRepo, int fid, int level) {
|
||||||
if (tsdbUpdateFileHeader(pFile) < 0) {
|
if (tsdbUpdateFileHeader(pFile) < 0) {
|
||||||
tsdbCloseFile(pFile);
|
tsdbCloseFile(pFile);
|
||||||
return NULL;
|
return NULL;
|
||||||
=======
|
|
||||||
SFileGroup *pGroup = tsdbSearchFGroup(pFileH, fid, TD_EQ);
|
|
||||||
if (pGroup == NULL) { // if not exists, create one
|
|
||||||
pFGroup->fileId = fid;
|
|
||||||
for (int type = 0; type < TSDB_FILE_TYPE_MAX; type++) {
|
|
||||||
if (tsdbCreateFile(&pFGroup->files[type], pRepo, fid, type) < 0) {
|
|
||||||
for (int i = type; i >= 0; i--) {
|
|
||||||
remove(pFGroup->files[i].fname);
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
>>>>>>> origin/develop
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tsdbCloseFile(pFile);
|
tsdbCloseFile(pFile);
|
||||||
|
@ -189,7 +175,6 @@ SFileGroup *tsdbCreateFGroup(STsdbRepo *pRepo, int fid, int level) {
|
||||||
id = TFILE_ID(&(pFile->file));
|
id = TFILE_ID(&(pFile->file));
|
||||||
}
|
}
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
// PUT GROUP INTO FILE HANDLE
|
// PUT GROUP INTO FILE HANDLE
|
||||||
pthread_rwlock_wrlock(&pFileH->fhlock);
|
pthread_rwlock_wrlock(&pFileH->fhlock);
|
||||||
pFileH->pFGroup[pFileH->nFGroups++] = fg;
|
pFileH->pFGroup[pFileH->nFGroups++] = fg;
|
||||||
|
@ -199,9 +184,6 @@ SFileGroup *tsdbCreateFGroup(STsdbRepo *pRepo, int fid, int level) {
|
||||||
SFileGroup *pfg = tsdbSearchFGroup(pFileH, fid, TD_EQ);
|
SFileGroup *pfg = tsdbSearchFGroup(pFileH, fid, TD_EQ);
|
||||||
ASSERT(pfg != NULL);
|
ASSERT(pfg != NULL);
|
||||||
return pfg;
|
return pfg;
|
||||||
=======
|
|
||||||
return pGroup;
|
|
||||||
>>>>>>> origin/develop
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void tsdbRemoveFileGroup(STsdbRepo *pRepo, SFileGroup *pFGroup) {
|
void tsdbRemoveFileGroup(STsdbRepo *pRepo, SFileGroup *pFGroup) {
|
||||||
|
|
Loading…
Reference in New Issue