From 7c56458122933a211e9f4842e0ba9f21fa694611 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Tue, 28 Dec 2021 14:04:24 +0800 Subject: [PATCH] refact --- include/dnode/vnode/vnode.h | 62 ------------------------------------- 1 file changed, 62 deletions(-) diff --git a/include/dnode/vnode/vnode.h b/include/dnode/vnode/vnode.h index 812f313e71..b5d0c11cf4 100644 --- a/include/dnode/vnode/vnode.h +++ b/include/dnode/vnode/vnode.h @@ -187,68 +187,6 @@ void vnodeOptionsInit(SVnodeCfg *pOptions); */ void vnodeOptionsClear(SVnodeCfg *pOptions); -/* ------------------------ REQUESTS ------------------------ */ -typedef STbCfg SVCreateTableReq; -typedef struct { - tb_uid_t uid; -} SVDropTableReq; - -typedef struct { - // TODO -} SVSubmitReq; - -typedef struct { - uint64_t ver; - union { - SVCreateTableReq ctReq; - SVDropTableReq dtReq; - }; -} SVnodeReq; - -typedef struct { - int err; - char info[]; -} SVnodeRsp; - -static FORCE_INLINE void vnodeSetCreateStbReq(SVnodeReq *pReq, char *name, uint32_t ttl, uint32_t keep, tb_uid_t suid, - STSchema *pSchema, STSchema *pTagSchema) { - pReq->ver = 0; - - pReq->ctReq.name = name; - pReq->ctReq.ttl = ttl; - pReq->ctReq.keep = keep; - pReq->ctReq.type = META_SUPER_TABLE; - pReq->ctReq.stbCfg.suid = suid; - pReq->ctReq.stbCfg.pSchema = pSchema; - pReq->ctReq.stbCfg.pTagSchema = pTagSchema; -} - -static FORCE_INLINE void vnodeSetCreateCtbReq(SVnodeReq *pReq, char *name, uint32_t ttl, uint32_t keep, tb_uid_t suid, - SKVRow pTag) { - pReq->ver = 0; - - pReq->ctReq.name = name; - pReq->ctReq.ttl = ttl; - pReq->ctReq.keep = keep; - pReq->ctReq.type = META_CHILD_TABLE; - pReq->ctReq.ctbCfg.suid = suid; - pReq->ctReq.ctbCfg.pTag = pTag; -} - -static FORCE_INLINE void vnodeSetCreateNtbReq(SVnodeReq *pReq, char *name, uint32_t ttl, uint32_t keep, - STSchema *pSchema) { - pReq->ver = 0; - - pReq->ctReq.name = name; - pReq->ctReq.ttl = ttl; - pReq->ctReq.keep = keep; - pReq->ctReq.type = META_NORMAL_TABLE; - pReq->ctReq.ntbCfg.pSchema = pSchema; -} - -int vnodeBuildReq(void **buf, const SVnodeReq *pReq, tmsg_t type); -void *vnodeParseReq(void *buf, SVnodeReq *pReq, tmsg_t type); - /* ------------------------ FOR COMPILE ------------------------ */ int32_t vnodeAlter(SVnode *pVnode, const SVnodeCfg *pCfg);