提交 63ef0459 编写于 作者: H Haojun Liao

fix: fix syntax error.

上级 53246ed6
...@@ -101,7 +101,7 @@ void vnodeApplyWriteMsg(SQueueInfo *pInfo, STaosQall *qall, int32_t numOfMsgs ...@@ -101,7 +101,7 @@ void vnodeApplyWriteMsg(SQueueInfo *pInfo, STaosQall *qall, int32_t numOfMsgs
void vnodeProposeCommitOnNeed(SVnode *pVnode, bool atExit); void vnodeProposeCommitOnNeed(SVnode *pVnode, bool atExit);
// meta // meta
void metaReaderInit(SMetaReader *pReader, void *pVnode, int32_t flags, SStoreMeta* pAPI); void _metaReaderInit(SMetaReader *pReader, void *pVnode, int32_t flags, SStoreMeta* pAPI);
void metaReaderReleaseLock(SMetaReader *pReader); void metaReaderReleaseLock(SMetaReader *pReader);
void metaReaderClear(SMetaReader *pReader); void metaReaderClear(SMetaReader *pReader);
int32_t metaReaderGetTableEntryByUid(SMetaReader *pReader, tb_uid_t uid); int32_t metaReaderGetTableEntryByUid(SMetaReader *pReader, tb_uid_t uid);
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#include "osMemory.h" #include "osMemory.h"
#include "tencode.h" #include "tencode.h"
void metaReaderInit(SMetaReader* pReader, void* pVnode, int32_t flags, SStoreMeta* pAPI) { void _metaReaderInit(SMetaReader* pReader, void* pVnode, int32_t flags, SStoreMeta* pAPI) {
SMeta* pMeta = ((SVnode*)pVnode)->pMeta; SMeta* pMeta = ((SVnode*)pVnode)->pMeta;
metaReaderDoInit(pReader, pMeta, flags); metaReaderDoInit(pReader, pMeta, flags);
pReader->pAPI = pAPI; pReader->pAPI = pAPI;
...@@ -143,7 +143,7 @@ tb_uid_t metaGetTableEntryUidByName(SMeta *pMeta, const char *name) { ...@@ -143,7 +143,7 @@ tb_uid_t metaGetTableEntryUidByName(SMeta *pMeta, const char *name) {
int metaGetTableNameByUid(void *pVnode, uint64_t uid, char *tbName) { int metaGetTableNameByUid(void *pVnode, uint64_t uid, char *tbName) {
int code = 0; int code = 0;
SMetaReader mr = {0}; SMetaReader mr = {0};
metaReaderInit(&mr, ((SVnode*)pVnode)->pMeta, 0); metaReaderDoInit(&mr, ((SVnode*)pVnode)->pMeta, 0);
code = metaReaderGetTableEntryByUid(&mr, uid); code = metaReaderGetTableEntryByUid(&mr, uid);
if (code < 0) { if (code < 0) {
metaReaderClear(&mr); metaReaderClear(&mr);
...@@ -195,7 +195,7 @@ int metaGetTableUidByName(void *pVnode, char *tbName, uint64_t *uid) { ...@@ -195,7 +195,7 @@ int metaGetTableUidByName(void *pVnode, char *tbName, uint64_t *uid) {
int metaGetTableTypeByName(void *pVnode, char *tbName, ETableType *tbType) { int metaGetTableTypeByName(void *pVnode, char *tbName, ETableType *tbType) {
int code = 0; int code = 0;
SMetaReader mr = {0}; SMetaReader mr = {0};
metaReaderInit(&mr, ((SVnode*)pVnode)->pMeta, 0); metaReaderDoInit(&mr, ((SVnode*)pVnode)->pMeta, 0);
code = metaGetTableEntryByName(&mr, tbName); code = metaGetTableEntryByName(&mr, tbName);
if (code == 0) *tbType = mr.me.type; if (code == 0) *tbType = mr.me.type;
...@@ -222,7 +222,7 @@ SMTbCursor *metaOpenTbCursor(void *pVnode) { ...@@ -222,7 +222,7 @@ SMTbCursor *metaOpenTbCursor(void *pVnode) {
} }
SVnode* pVnodeObj = pVnode; SVnode* pVnodeObj = pVnode;
metaReaderInit(&pTbCur->mr, pVnodeObj->pMeta, 0); metaReaderDoInit(&pTbCur->mr, pVnodeObj->pMeta, 0);
// tdbTbcMoveToFirst((TBC *)pTbCur->pDbc); // tdbTbcMoveToFirst((TBC *)pTbCur->pDbc);
pTbCur->pMeta = pVnodeObj->pMeta; pTbCur->pMeta = pVnodeObj->pMeta;
...@@ -254,7 +254,7 @@ void metaPauseTbCursor(SMTbCursor *pTbCur) { ...@@ -254,7 +254,7 @@ void metaPauseTbCursor(SMTbCursor *pTbCur) {
} }
void metaResumeTbCursor(SMTbCursor *pTbCur, int8_t first) { void metaResumeTbCursor(SMTbCursor *pTbCur, int8_t first) {
if (pTbCur->paused) { if (pTbCur->paused) {
metaReaderInit(&pTbCur->mr, pTbCur->pMeta, 0); metaReaderDoInit(&pTbCur->mr, pTbCur->pMeta, 0);
tdbTbcOpen(((SMeta *)pTbCur->pMeta)->pUidIdx, (TBC **)&pTbCur->pDbc, NULL); tdbTbcOpen(((SMeta *)pTbCur->pMeta)->pUidIdx, (TBC **)&pTbCur->pDbc, NULL);
......
...@@ -206,7 +206,7 @@ void initStateStoreAPI(SStateStore* pStore) { ...@@ -206,7 +206,7 @@ void initStateStoreAPI(SStateStore* pStore) {
} }
void initMetaReaderAPI(SStoreMetaReader* pMetaReader) { void initMetaReaderAPI(SStoreMetaReader* pMetaReader) {
pMetaReader->initReader = metaReaderInit; pMetaReader->initReader = _metaReaderInit;
pMetaReader->clearReader = metaReaderClear; pMetaReader->clearReader = metaReaderClear;
pMetaReader->getTableEntryByUid = metaReaderGetTableEntryByUid; pMetaReader->getTableEntryByUid = metaReaderGetTableEntryByUid;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册