From 05c07ba6f9f6ddeb1e972110fb10bf4724df38ca Mon Sep 17 00:00:00 2001 From: Liu Jicong Date: Mon, 25 Oct 2021 15:16:39 +0800 Subject: [PATCH] tq (#8416) add tq header --- .gitignore | 1 + include/libs/wal/wal.h | 4 ++-- source/server/vnode/tq/src/tq.c | 16 +++++++++++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 83ed62c030..8df75abe20 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ mac/ .mypy_cache *.tmp *.swp +*.orig src/connector/nodejs/node_modules/ src/connector/nodejs/out/ tests/test/ diff --git a/include/libs/wal/wal.h b/include/libs/wal/wal.h index b6fd5a70d9..9a3310922d 100644 --- a/include/libs/wal/wal.h +++ b/include/libs/wal/wal.h @@ -58,9 +58,9 @@ void walStop(twalh); void walClose(twalh); //write -int64_t walWriteWithMsgType(twalh, int8_t msgType, void* body, int32_t bodyLen); +//int64_t walWriteWithMsgType(twalh, int8_t msgType, void* body, int32_t bodyLen); int64_t walWrite(twalh, void* body, int32_t bodyLen); -int64_t walWriteBatch(twalh, void* body, int32_t* bodyLen, int32_t batchSize); +int64_t walWriteBatch(twalh, void** bodies, int32_t* bodyLen, int32_t batchSize); //apis for lifecycle management void walFsync(twalh, bool force); diff --git a/source/server/vnode/tq/src/tq.c b/source/server/vnode/tq/src/tq.c index b2bfbced37..e0f2fc545e 100644 --- a/source/server/vnode/tq/src/tq.c +++ b/source/server/vnode/tq/src/tq.c @@ -59,13 +59,27 @@ int tqOpenTGroup(STQ* pTq, const char* topic, int cgId) { /*int tqCloseTCGroup(STQ* pTq, const char* topic, int cgId) {*/ /*tqGroupHandle* handle = tqLookupGroupHandle(pTq, topic, cgId);*/ /*return tqCommitTCGroup(handle);*/ -} +/*}*/ int tqDropTCGroup(STQ* pTq, const char* topic, int cgId) { //delete from disk return 0; } + +int tqFetchMsg(tqGroupHandle* handle, void* msg) { + return 0; +} + +int tqMoveOffsetToNext(tqGroupHandle* handle) { + return 0; +} + + +tqGroupHandle* tqFindGHandleBycId(STQ* pTq, int64_t cId) { + return NULL; +} + int tqPushMsg(STQ* pTq , void* p, int64_t version) { //add reference //judge and launch new query -- GitLab