提交 a1a0661d 编写于 作者: H Hongze Cheng

add vgId in TSDB log

上级 68753218
...@@ -28,7 +28,7 @@ static int tsdbRestoreTable(void *pHandle, void *cont, int contLen); ...@@ -28,7 +28,7 @@ static int tsdbRestoreTable(void *pHandle, void *cont, int contLen);
static void tsdbOrgMeta(void *pHandle); static void tsdbOrgMeta(void *pHandle);
static char * getTagIndexKey(const void *pData); static char * getTagIndexKey(const void *pData);
static STable *tsdbNewTable(); static STable *tsdbNewTable();
static STable *tsdbCreateTableFromCfg(STableCfg *pCfg, bool isSuper); static STable *tsdbCreateTableFromCfg(STableCfg *pCfg, bool isSuper, STsdbRepo *pRepo);
static void tsdbFreeTable(STable *pTable); static void tsdbFreeTable(STable *pTable);
static int tsdbAddTableToMeta(STsdbRepo *pRepo, STable *pTable, bool addIdx, bool lock); static int tsdbAddTableToMeta(STsdbRepo *pRepo, STable *pTable, bool addIdx, bool lock);
static void tsdbRemoveTableFromMeta(STsdbRepo *pRepo, STable *pTable, bool rmFromIdx, bool lock); static void tsdbRemoveTableFromMeta(STsdbRepo *pRepo, STable *pTable, bool rmFromIdx, bool lock);
...@@ -93,7 +93,7 @@ int tsdbCreateTable(TSDB_REPO_T *repo, STableCfg *pCfg) { ...@@ -93,7 +93,7 @@ int tsdbCreateTable(TSDB_REPO_T *repo, STableCfg *pCfg) {
super = tsdbGetTableByUid(pMeta, pCfg->superUid); super = tsdbGetTableByUid(pMeta, pCfg->superUid);
if (super == NULL) { // super table not exists, try to create it if (super == NULL) { // super table not exists, try to create it
newSuper = 1; newSuper = 1;
super = tsdbCreateTableFromCfg(pCfg, true); super = tsdbCreateTableFromCfg(pCfg, true, pRepo);
if (super == NULL) goto _err; if (super == NULL) goto _err;
} else { } else {
if (TABLE_TYPE(super) != TSDB_SUPER_TABLE || TABLE_UID(super) != pCfg->superUid) { if (TABLE_TYPE(super) != TSDB_SUPER_TABLE || TABLE_UID(super) != pCfg->superUid) {
...@@ -103,7 +103,7 @@ int tsdbCreateTable(TSDB_REPO_T *repo, STableCfg *pCfg) { ...@@ -103,7 +103,7 @@ int tsdbCreateTable(TSDB_REPO_T *repo, STableCfg *pCfg) {
} }
} }
table = tsdbCreateTableFromCfg(pCfg, false); table = tsdbCreateTableFromCfg(pCfg, false, pRepo);
if (table == NULL) goto _err; if (table == NULL) goto _err;
// Register to meta // Register to meta
...@@ -667,7 +667,7 @@ static STable *tsdbNewTable() { ...@@ -667,7 +667,7 @@ static STable *tsdbNewTable() {
return pTable; return pTable;
} }
static STable *tsdbCreateTableFromCfg(STableCfg *pCfg, bool isSuper) { static STable *tsdbCreateTableFromCfg(STableCfg *pCfg, bool isSuper, STsdbRepo *pRepo) {
STable *pTable = NULL; STable *pTable = NULL;
size_t tsize = 0; size_t tsize = 0;
...@@ -745,8 +745,8 @@ static STable *tsdbCreateTableFromCfg(STableCfg *pCfg, bool isSuper) { ...@@ -745,8 +745,8 @@ static STable *tsdbCreateTableFromCfg(STableCfg *pCfg, bool isSuper) {
T_REF_INC(pTable); T_REF_INC(pTable);
tsdbTrace("table %s tid %d uid %" PRIu64 " is created", TABLE_CHAR_NAME(pTable), TABLE_TID(pTable), tsdbTrace("vgId:%d table %s tid %d uid %" PRIu64 " is created", REPO_ID(pRepo), TABLE_CHAR_NAME(pTable),
TABLE_UID(pTable)); TABLE_TID(pTable), TABLE_UID(pTable));
return pTable; return pTable;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册