This commit is contained in:
Hongze Cheng 2022-01-13 08:52:37 +00:00
parent a20724f46e
commit 254e144f04
1 changed files with 4 additions and 2 deletions

View File

@ -17,9 +17,11 @@
int tsdbInsertData(STsdb *pTsdb, SSubmitMsg *pMsg, SSubmitRsp *pRsp) { int tsdbInsertData(STsdb *pTsdb, SSubmitMsg *pMsg, SSubmitRsp *pRsp) {
// Check if mem is there. If not, create one. // Check if mem is there. If not, create one.
if (pTsdb->mem == NULL) {
pTsdb->mem = tsdbNewMemTable(pTsdb); pTsdb->mem = tsdbNewMemTable(pTsdb);
if (pTsdb->mem == NULL) { if (pTsdb->mem == NULL) {
return -1; return -1;
} }
}
return tsdbMemTableInsert(pTsdb, pTsdb->mem, pMsg, NULL); return tsdbMemTableInsert(pTsdb, pTsdb->mem, pMsg, NULL);
} }