From 4f27533d426a483ea4f1203d17acc0ba6abacf69 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Sat, 23 Apr 2022 15:33:25 +0800 Subject: [PATCH] enh(rpc): fix hb problem --- .../mnode/impl/test/profile/.profile.cpp.swo | Bin 16384 -> 0 bytes source/dnode/vnode/inc/log | 586 ------------------ source/dnode/vnode/src/vnd/vnodeQuery.c | 11 +- source/libs/transport/src/transSrv.c | 6 + 4 files changed, 12 insertions(+), 591 deletions(-) delete mode 100644 source/dnode/mnode/impl/test/profile/.profile.cpp.swo delete mode 100644 source/dnode/vnode/inc/log diff --git a/source/dnode/mnode/impl/test/profile/.profile.cpp.swo b/source/dnode/mnode/impl/test/profile/.profile.cpp.swo deleted file mode 100644 index 004b23f8f98327c311baaa89f32bcfab92866a8c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16384 zcmeI3U2Ggz700I}rJ<0tfK&oV^s+(GthL@V#A+1;c`qjowwd)GVi zcxF6v$7U0iO7sD>LI|1yqVNO{h<*sf1D{2G;Ohb2ka$6A0YyLo5kT-n`1s#DA3L+_ zwMkS2LSyCU_1t^r-gD1A_ue^YHqGMsg=I38ACvHNwe+bA&V zvV!ecZQY>ZXI``I-TFxDQVXOO*uerGYmZJHlqSZ)0M|HJtI z#$A&1Yw$977CZ&EfD3A11uTLOfN3xV4uBhnBOW+~!esB={@GX+`1Mn%(1?RyC$b#Rz89IWez>{DeX`U=_R@ybJscbNMp(0{A?50-Of#1h)e|*ZV;9L&$8sUa2*d%30aHoFm2T zNr@2MWW>Ep?juaK+*!v_yJsk?>zAqQxON`6LX4HEOC4P`P*X1%IyKpRb53Pir{>zS zz3i@yp0Z1p$#TTM(D3&XHFM-B+7L|)+(uA?j;|CSJ1Ievo_1jiEgEVW)Kx2@s~j;s z!?2m-w_CF{^gkjx<^#bOO7eATwrX@!Zj_fB%5t@=%vWY>jk(HfBS)HEJ4cv7P27%t zS$)XBaC;<*aWutf>89v(%hFpTgz&b|rQA0*x;c_{pp|MEmd33j2i*yKPmC)}^v{*u zrSs~!r6m|3*)>-tmcbXXjED$SHu!rsGgr)S|}^!IWe2D zHH{XBt!Y&8sn~H%^8vz4*m5uvITEOZ#$mzu!t#d%895;crw>fSCzAV3xT?7rdQC3j zUh}bl!4cp23k$||PjbZsWo8kF_08DlE> zSMB(8?$lhX2?5>20@hnft2sV=C)>;v^uG)QiD?lQj3 z!rh!N@n8(A7?`5TvWK%~N?{|}Xr#=+E-d?(@aw^mYaP`|7GDxRwF>8XaHUpOmMYbU z!!<^T5ciwA#EUaritBHihh}JvtXgt8#SD& zF%fFlDa%vay;OWS-`;HDAk5$_P>qh|22<8spJLnUJy6Y7R-OsGP8>Bf}Y z#Qxol=~lKQ?i>GWy9#s){R3{%tPAn-rUi(KIY2aC-Y;BuzmRMWVar71?SNQV=KlliCtaEmMmF+bRU7O(x(`72t zH6Ahe`h@*QHIX7g$5Dl7KJ1)J)jge2balmFKqZ5!riZ>y60S|qQBSEIZV}I9nF8Ce z{V$Uz53g|7q5@Yev!x97TO*A~VDvBbk}udh6!e%na|4p8!X6Q!_kRDdT!9 z-^suXBL#qe-uFOH9gGB|vwC>Sk{jTVoK`(Sw&4`XC3Uli9( zN2hJFT*Y$|*|1ukLAlQS`|!d#t`Jf^*0FFF8f%_v650Pe9iDGEk~XqJPTUsUF1|)z z7#Wdx{C_`UO&+82_`ezih1U?vzW|;CUjmPV61WfWc>gf?8{+s^!7Jc%U=y4KJkI|M z;`X0{Z-7sOtKezyF`$A+!F#|B#PF|zm%wL$0oK7$Z~*)kG5l-btKb=6fH`mvxQ6)s zE8sHdf(9spL*O;U?cW8T1%1PPAe84QteS}2Q9BNi>(Vj5#{VQER>!??ItCL>aOr(DK5 zM)mq8G7{bOQW?FD@T?YGU^<#1#j3X!?jK`yU5Xr}H;8D1^AqvEYN%lwK z!{m}7_@ETG93PpVv|cRX2Kp`d~A`1S3qx zJPOYrl<}upWa5xC@xyt7>>N)R`qmGOiP`Qj66`a8&U0!uTs$G&Av=YWK=OMvG{_7C9fMjwR?t;-=`Bw_|NI>4)kO~A|KV5edKwWV0gmWxf_)3DRH0q}!y!U+OgRQip7~YeQ4dClY7cfAC4 -802e2d77c00 include/tkv/tkv.h (Hongze Cheng 2021-09-22 13:21:07 +0800 3) * -802e2d77c00 include/tkv/tkv.h (Hongze Cheng 2021-09-22 13:21:07 +0800 4) * This program is free software: you can use, redistribute, and/or modify -802e2d77c00 include/tkv/tkv.h (Hongze Cheng 2021-09-22 13:21:07 +0800 5) * it under the terms of the GNU Affero General Public License, version 3 -802e2d77c00 include/tkv/tkv.h (Hongze Cheng 2021-09-22 13:21:07 +0800 6) * or later ("AGPL"), as published by the Free Software Foundation. -802e2d77c00 include/tkv/tkv.h (Hongze Cheng 2021-09-22 13:21:07 +0800 7) * -802e2d77c00 include/tkv/tkv.h (Hongze Cheng 2021-09-22 13:21:07 +0800 8) * This program is distributed in the hope that it will be useful, but WITHOUT -802e2d77c00 include/tkv/tkv.h (Hongze Cheng 2021-09-22 13:21:07 +0800 9) * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -802e2d77c00 include/tkv/tkv.h (Hongze Cheng 2021-09-22 13:21:07 +0800 10) * FITNESS FOR A PARTICULAR PURPOSE. -802e2d77c00 include/tkv/tkv.h (Hongze Cheng 2021-09-22 13:21:07 +0800 11) * -802e2d77c00 include/tkv/tkv.h (Hongze Cheng 2021-09-22 13:21:07 +0800 12) * You should have received a copy of the GNU Affero General Public License -802e2d77c00 include/tkv/tkv.h (Hongze Cheng 2021-09-22 13:21:07 +0800 13) * along with this program. If not, see . -ce7a1600eb4 include/server/vnode/vnode.h (Shengliang Guan 2021-09-22 20:29:24 +0800 14) */ -ce7a1600eb4 include/server/vnode/vnode.h (Shengliang Guan 2021-09-22 20:29:24 +0800 15) -ce7a1600eb4 include/server/vnode/vnode.h (Shengliang Guan 2021-09-22 20:29:24 +0800 16) #ifndef _TD_VNODE_H_ -ce7a1600eb4 include/server/vnode/vnode.h (Shengliang Guan 2021-09-22 20:29:24 +0800 17) #define _TD_VNODE_H_ -ce7a1600eb4 include/server/vnode/vnode.h (Shengliang Guan 2021-09-22 20:29:24 +0800 18) -79e5aeaa093 include/server/vnode/vnode.h (Hongze Cheng 2021-11-09 13:24:22 +0800 19) #include "os.h" -220fdfabe29 source/dnode/vnode/inc/vnode.h (Shengliang Guan 2022-03-21 19:08:25 +0800 20) #include "tmsgcb.h" -a9ad7ebd100 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-29 18:58:15 +0800 21) #include "tqueue.h" -a9ad7ebd100 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-29 18:58:15 +0800 22) #include "trpc.h" -79e5aeaa093 include/server/vnode/vnode.h (Hongze Cheng 2021-11-09 13:24:22 +0800 23) -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 24) #include "tarray.h" -cc5563716c5 source/dnode/vnode/inc/vnode.h (Shengliang Guan 2022-01-18 22:04:01 -0800 25) #include "tfs.h" -2b5e0592c4d include/dnode/vnode/vnode.h (Hongze Cheng 2021-11-24 16:29:02 +0800 26) #include "wal.h" -2f36662750f include/server/vnode/vnode.h (Shengliang Guan 2021-11-01 19:49:44 +0800 27) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 28) #include "tmallocator.h" -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 29) #include "tmsg.h" -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 30) #include "trow.h" -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 31) #include "tmallocator.h" -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 32) #include "tcommon.h" -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 33) #include "tfs.h" -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 34) -ce7a1600eb4 include/server/vnode/vnode.h (Shengliang Guan 2021-09-22 20:29:24 +0800 35) #ifdef __cplusplus -ce7a1600eb4 include/server/vnode/vnode.h (Shengliang Guan 2021-09-22 20:29:24 +0800 36) extern "C" { -ce7a1600eb4 include/server/vnode/vnode.h (Shengliang Guan 2021-09-22 20:29:24 +0800 37) #endif -ce7a1600eb4 include/server/vnode/vnode.h (Shengliang Guan 2021-09-22 20:29:24 +0800 38) -993d28df0f6 include/server/vnode/vnode.h (Hongze Cheng 2021-11-07 15:58:32 +0800 39) /* ------------------------ TYPES EXPOSED ------------------------ */ -5832b6772c1 source/dnode/vnode/inc/vnode.h (Shengliang Guan 2022-03-16 21:18:54 +0800 40) typedef struct SMgmtWrapper SMgmtWrapper; -5832b6772c1 source/dnode/vnode/inc/vnode.h (Shengliang Guan 2022-03-16 21:18:54 +0800 41) typedef struct SVnode SVnode; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 42) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 43) #define META_SUPER_TABLE TD_SUPER_TABLE -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 44) #define META_CHILD_TABLE TD_CHILD_TABLE -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 45) #define META_NORMAL_TABLE TD_NORMAL_TABLE -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 46) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 47) // Types exported -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 48) typedef struct SMeta SMeta; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 49) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 50) typedef struct SMetaCfg { -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 51) /// LRU cache size -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 52) uint64_t lruSize; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 53) } SMetaCfg; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 54) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 55) typedef struct SMTbCursor SMTbCursor; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 56) typedef struct SMCtbCursor SMCtbCursor; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 57) typedef struct SMSmaCursor SMSmaCursor; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 58) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 59) typedef SVCreateTbReq STbCfg; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 60) typedef SVCreateTSmaReq SSmaCfg; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 61) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 62) typedef struct SDataStatis { -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 63) int16_t colId; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 64) int16_t maxIndex; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 65) int16_t minIndex; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 66) int16_t numOfNull; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 67) int64_t sum; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 68) int64_t max; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 69) int64_t min; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 70) } SDataStatis; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 71) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 72) typedef struct STsdbQueryCond { -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 73) STimeWindow twindow; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 74) int32_t order; // desc|asc order to iterate the data block -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 75) int32_t numOfCols; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 76) SColumnInfo *colList; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 77) bool loadExternalRows; // load external rows or not -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 78) int32_t type; // data block load type: -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 79) } STsdbQueryCond; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 80) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 81) typedef struct { -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 82) TSKEY lastKey; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 83) uint64_t uid; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 84) } STableKeyInfo; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 85) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 86) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 87) typedef struct STable { -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 88) uint64_t tid; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 89) uint64_t uid; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 90) STSchema *pSchema; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 91) } STable; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 92) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 93) #define BLOCK_LOAD_OFFSET_SEQ_ORDER 1 -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 94) #define BLOCK_LOAD_TABLE_SEQ_ORDER 2 -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 95) #define BLOCK_LOAD_TABLE_RR_ORDER 3 -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 96) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 97) #define TABLE_TID(t) (t)->tid -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 98) #define TABLE_UID(t) (t)->uid -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 99) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 100) // TYPES EXPOSED -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 101) typedef struct STsdb STsdb; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 102) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 103) typedef struct STsdbCfg { -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 104) int8_t precision; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 105) int8_t update; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 106) int8_t compression; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 107) int32_t daysPerFile; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 108) int32_t minRowsPerFileBlock; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 109) int32_t maxRowsPerFileBlock; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 110) int32_t keep; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 111) int32_t keep1; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 112) int32_t keep2; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 113) uint64_t lruCacheSize; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 114) SArray *retentions; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 115) } STsdbCfg; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 116) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 117) -a038c466075 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-02-15 10:11:34 +0800 118) typedef struct { -35749cb3742 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-21 16:12:02 +0800 119) // TODO -35749cb3742 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-21 16:12:02 +0800 120) int32_t reserved; -35749cb3742 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-21 16:12:02 +0800 121) } STqCfg; -35749cb3742 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-21 16:12:02 +0800 122) -a038c466075 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-02-15 10:11:34 +0800 123) typedef struct { -7dbc861b4c1 source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-01-13 08:57:18 +0000 124) int32_t vgId; -5f2dc1401fe source/dnode/vnode/inc/vnode.h (dapan1121 2022-02-11 19:52:07 +0800 125) uint64_t dbId; -ed9709c3f0a source/dnode/vnode/inc/vnode.h (Shengliang Guan 2022-01-18 21:39:32 -0800 126) STfs *pTfs; -7dbc861b4c1 source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-01-13 08:57:18 +0000 127) uint64_t wsize; -7dbc861b4c1 source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-01-13 08:57:18 +0000 128) uint64_t ssize; -7dbc861b4c1 source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-01-13 08:57:18 +0000 129) uint64_t lsize; -7dbc861b4c1 source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-01-13 08:57:18 +0000 130) bool isHeapAllocator; -2ae35c3404c include/dnode/vnode/vnode.h (Hongze Cheng 2021-11-26 13:43:38 +0800 131) uint32_t ttl; -2ae35c3404c include/dnode/vnode/vnode.h (Hongze Cheng 2021-11-26 13:43:38 +0800 132) uint32_t keep; -82bcecc4ff5 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-02-18 16:59:33 +0800 133) int8_t streamMode; -7dbc861b4c1 source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-01-13 08:57:18 +0000 134) bool isWeak; -2ae35c3404c include/dnode/vnode/vnode.h (Hongze Cheng 2021-11-26 13:43:38 +0800 135) STsdbCfg tsdbCfg; -2ae35c3404c include/dnode/vnode/vnode.h (Hongze Cheng 2021-11-26 13:43:38 +0800 136) SMetaCfg metaCfg; -7dbc861b4c1 source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-01-13 08:57:18 +0000 137) STqCfg tqCfg; -7dbc861b4c1 source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-01-13 08:57:18 +0000 138) SWalCfg walCfg; -220fdfabe29 source/dnode/vnode/inc/vnode.h (Shengliang Guan 2022-03-21 19:08:25 +0800 139) SMsgCb msgCb; -09e6462c5fa source/dnode/vnode/inc/vnode.h (dapan1121 2022-03-03 09:09:11 +0800 140) uint32_t hashBegin; -09e6462c5fa source/dnode/vnode/inc/vnode.h (dapan1121 2022-03-03 09:09:11 +0800 141) uint32_t hashEnd; -913e8d70d87 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-09 10:49:42 +0800 142) int8_t hashMethod; -2ae35c3404c include/dnode/vnode/vnode.h (Hongze Cheng 2021-11-26 13:43:38 +0800 143) } SVnodeCfg; -993d28df0f6 include/server/vnode/vnode.h (Hongze Cheng 2021-11-07 15:58:32 +0800 144) -a038c466075 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-02-15 10:11:34 +0800 145) typedef struct { -5bb010ef4af source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-28 15:24:09 +0800 146) int64_t ver; -a038c466075 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-02-15 10:11:34 +0800 147) int64_t tbUid; -5bb010ef4af source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-28 15:24:09 +0800 148) SHashObj *tbIdHash; -246311d4fcf source/dnode/vnode/inc/vnode.h (Shengliang Guan 2022-02-16 15:27:19 +0800 149) const SSubmitReq *pMsg; -5bb010ef4af source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-28 15:24:09 +0800 150) SSubmitBlk *pBlock; -5bb010ef4af source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-28 15:24:09 +0800 151) SSubmitMsgIter msgIter; -5bb010ef4af source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-28 15:24:09 +0800 152) SSubmitBlkIter blkIter; -5bb010ef4af source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-28 15:24:09 +0800 153) SMeta *pVnodeMeta; -5bb010ef4af source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-28 15:24:09 +0800 154) SArray *pColIdList; // SArray -5bb010ef4af source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-28 15:24:09 +0800 155) int32_t sver; -5bb010ef4af source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-28 15:24:09 +0800 156) SSchemaWrapper *pSchemaWrapper; -5bb010ef4af source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-28 15:24:09 +0800 157) STSchema *pSchema; -35749cb3742 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-21 16:12:02 +0800 158) } STqReadHandle; -35749cb3742 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-21 16:12:02 +0800 159) -993d28df0f6 include/server/vnode/vnode.h (Hongze Cheng 2021-11-07 15:58:32 +0800 160) /* ------------------------ SVnode ------------------------ */ -757dea61705 include/dnode/vnode/vnode.h (Hongze Cheng 2021-11-29 14:06:16 +0800 161) /** -757dea61705 include/dnode/vnode/vnode.h (Hongze Cheng 2021-11-29 14:06:16 +0800 162) * @brief Initialize the vnode module -018661e1779 include/dnode/vnode/vnode.h (Hongze Cheng 2021-11-29 15:42:17 +0800 163) * -757dea61705 include/dnode/vnode/vnode.h (Hongze Cheng 2021-11-29 14:06:16 +0800 164) * @return int 0 for success and -1 for failure -757dea61705 include/dnode/vnode/vnode.h (Hongze Cheng 2021-11-29 14:06:16 +0800 165) */ -220fdfabe29 source/dnode/vnode/inc/vnode.h (Shengliang Guan 2022-03-21 19:08:25 +0800 166) int vnodeInit(); -757dea61705 include/dnode/vnode/vnode.h (Hongze Cheng 2021-11-29 14:06:16 +0800 167) -757dea61705 include/dnode/vnode/vnode.h (Hongze Cheng 2021-11-29 14:06:16 +0800 168) /** -0b6d32a3d92 include/dnode/vnode/vnode.h (Shengliang Guan 2022-01-11 19:35:40 -0800 169) * @brief Cleanup the vnode module -018661e1779 include/dnode/vnode/vnode.h (Hongze Cheng 2021-11-29 15:42:17 +0800 170) * -757dea61705 include/dnode/vnode/vnode.h (Hongze Cheng 2021-11-29 14:06:16 +0800 171) */ -0b6d32a3d92 include/dnode/vnode/vnode.h (Shengliang Guan 2022-01-11 19:35:40 -0800 172) void vnodeCleanup(); -757dea61705 include/dnode/vnode/vnode.h (Hongze Cheng 2021-11-29 14:06:16 +0800 173) -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 174) /** -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 175) * @brief Open a VNODE. -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 176) * -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 177) * @param path path of the vnode -3906f6a7073 include/dnode/vnode/vnode.h (Hongze Cheng 2021-11-22 15:39:05 +0800 178) * @param pVnodeCfg options of the vnode -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 179) * @return SVnode* The vnode object -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 180) */ -ab3378e0901 include/dnode/vnode/vnode.h (Shengliang Guan 2022-01-11 16:44:11 -0800 181) SVnode *vnodeOpen(const char *path, const SVnodeCfg *pVnodeCfg); -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 182) -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 183) /** -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 184) * @brief Close a VNODE -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 185) * -baac49c75b2 include/dnode/vnode/vnode.h (Hongze Cheng 2021-11-12 17:50:46 +0800 186) * @param pVnode The vnode object to close -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 187) */ -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 188) void vnodeClose(SVnode *pVnode); -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 189) -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 190) /** -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 191) * @brief Destroy a VNODE. -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 192) * -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 193) * @param path Path of the VNODE. -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 194) */ -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 195) void vnodeDestroy(const char *path); -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 196) -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 197) /** -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 198) * @brief Process an array of write messages. -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 199) * -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 200) * @param pVnode The vnode object. -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 201) * @param pMsgs The array of SRpcMsg -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 202) */ -50229512d32 source/dnode/vnode/inc/vnode.h (Shengliang Guan 2022-03-21 14:39:35 +0800 203) void vnodeProcessWMsgs(SVnode *pVnode, SArray *pMsgs); -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 204) -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 205) /** -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 206) * @brief Apply a write request message. -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 207) * -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 208) * @param pVnode The vnode object. -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 209) * @param pMsg The request message -15d9a46600d include/server/vnode/vnode.h (Hongze Cheng 2021-11-12 10:53:52 +0800 210) * @param pRsp The response message -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 211) * @return int 0 for success, -1 for failure -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 212) */ -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 213) int vnodeApplyWMsg(SVnode *pVnode, SRpcMsg *pMsg, SRpcMsg **pRsp); -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 214) -6beee204d82 include/dnode/vnode/vnode.h (Liu Jicong 2021-12-21 20:07:32 +0800 215) /** -6beee204d82 include/dnode/vnode/vnode.h (Liu Jicong 2021-12-21 20:07:32 +0800 216) * @brief Process a consume message. -6beee204d82 include/dnode/vnode/vnode.h (Liu Jicong 2021-12-21 20:07:32 +0800 217) * -6beee204d82 include/dnode/vnode/vnode.h (Liu Jicong 2021-12-21 20:07:32 +0800 218) * @param pVnode The vnode object. -6beee204d82 include/dnode/vnode/vnode.h (Liu Jicong 2021-12-21 20:07:32 +0800 219) * @param pMsg The request message -6beee204d82 include/dnode/vnode/vnode.h (Liu Jicong 2021-12-21 20:07:32 +0800 220) * @param pRsp The response message -6beee204d82 include/dnode/vnode/vnode.h (Liu Jicong 2021-12-21 20:07:32 +0800 221) * @return int 0 for success, -1 for failure -6beee204d82 include/dnode/vnode/vnode.h (Liu Jicong 2021-12-21 20:07:32 +0800 222) */ -6beee204d82 include/dnode/vnode/vnode.h (Liu Jicong 2021-12-21 20:07:32 +0800 223) int vnodeProcessCMsg(SVnode *pVnode, SRpcMsg *pMsg, SRpcMsg **pRsp); -6beee204d82 include/dnode/vnode/vnode.h (Liu Jicong 2021-12-21 20:07:32 +0800 224) -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 225) /** -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 226) * @brief Process the sync request -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 227) * -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 228) * @param pVnode -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 229) * @param pMsg -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 230) * @param pRsp -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 231) * @return int -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 232) */ -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 233) int vnodeProcessSyncReq(SVnode *pVnode, SRpcMsg *pMsg, SRpcMsg **pRsp); -993d28df0f6 include/server/vnode/vnode.h (Hongze Cheng 2021-11-07 15:58:32 +0800 234) -293ad0bb066 include/dnode/vnode/vnode.h (Shengliang Guan 2021-12-21 16:15:38 +0800 235) /** -293ad0bb066 include/dnode/vnode/vnode.h (Shengliang Guan 2021-12-21 16:15:38 +0800 236) * @brief Process a query message. -293ad0bb066 include/dnode/vnode/vnode.h (Shengliang Guan 2021-12-21 16:15:38 +0800 237) * -293ad0bb066 include/dnode/vnode/vnode.h (Shengliang Guan 2021-12-21 16:15:38 +0800 238) * @param pVnode The vnode object. -293ad0bb066 include/dnode/vnode/vnode.h (Shengliang Guan 2021-12-21 16:15:38 +0800 239) * @param pMsg The request message -293ad0bb066 include/dnode/vnode/vnode.h (Shengliang Guan 2021-12-21 16:15:38 +0800 240) * @return int 0 for success, -1 for failure -293ad0bb066 include/dnode/vnode/vnode.h (Shengliang Guan 2021-12-21 16:15:38 +0800 241) */ -808efe80698 source/dnode/vnode/inc/vnode.h (Shengliang 2022-01-25 14:20:52 +0800 242) int vnodeProcessQueryMsg(SVnode *pVnode, SRpcMsg *pMsg); -293ad0bb066 include/dnode/vnode/vnode.h (Shengliang Guan 2021-12-21 16:15:38 +0800 243) -293ad0bb066 include/dnode/vnode/vnode.h (Shengliang Guan 2021-12-21 16:15:38 +0800 244) /** -293ad0bb066 include/dnode/vnode/vnode.h (Shengliang Guan 2021-12-21 16:15:38 +0800 245) * @brief Process a fetch message. -293ad0bb066 include/dnode/vnode/vnode.h (Shengliang Guan 2021-12-21 16:15:38 +0800 246) * -293ad0bb066 include/dnode/vnode/vnode.h (Shengliang Guan 2021-12-21 16:15:38 +0800 247) * @param pVnode The vnode object. -293ad0bb066 include/dnode/vnode/vnode.h (Shengliang Guan 2021-12-21 16:15:38 +0800 248) * @param pMsg The request message -293ad0bb066 include/dnode/vnode/vnode.h (Shengliang Guan 2021-12-21 16:15:38 +0800 249) * @return int 0 for success, -1 for failure -293ad0bb066 include/dnode/vnode/vnode.h (Shengliang Guan 2021-12-21 16:15:38 +0800 250) */ -a9ad7ebd100 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-29 18:58:15 +0800 251) int vnodeProcessFetchMsg(SVnode *pVnode, SRpcMsg *pMsg, SQueueInfo *pInfo); -293ad0bb066 include/dnode/vnode/vnode.h (Shengliang Guan 2021-12-21 16:15:38 +0800 252) -9001468b212 include/dnode/vnode/vnode.h (Hongze Cheng 2021-11-22 15:02:53 +0800 253) /* ------------------------ SVnodeCfg ------------------------ */ -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 254) /** -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 255) * @brief Initialize VNODE options. -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 256) * -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 257) * @param pOptions The options object to be initialized. It should not be NULL. -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 258) */ -9001468b212 include/dnode/vnode/vnode.h (Hongze Cheng 2021-11-22 15:02:53 +0800 259) void vnodeOptionsInit(SVnodeCfg *pOptions); -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 260) -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 261) /** -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 262) * @brief Clear VNODE options. -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 263) * -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 264) * @param pOptions Options to clear. -7277784852b include/server/vnode/vnode.h (Hongze Cheng 2021-11-11 11:41:16 +0800 265) */ -9001468b212 include/dnode/vnode/vnode.h (Hongze Cheng 2021-11-22 15:02:53 +0800 266) void vnodeOptionsClear(SVnodeCfg *pOptions); -993d28df0f6 include/server/vnode/vnode.h (Hongze Cheng 2021-11-07 15:58:32 +0800 267) -260aad808b4 source/dnode/vnode/inc/vnode.h (dapan1121 2022-03-11 19:45:34 +0800 268) int vnodeValidateTableHash(SVnodeCfg *pVnodeOptions, char *tableFName); -763eccf8aa4 source/dnode/vnode/inc/vnode.h (dapan1121 2022-03-10 19:05:58 +0800 269) -c8ee7ba9a7b include/server/vnode/vnode.h (Hongze Cheng 2021-11-09 14:36:53 +0800 270) /* ------------------------ FOR COMPILE ------------------------ */ -c8ee7ba9a7b include/server/vnode/vnode.h (Hongze Cheng 2021-11-09 14:36:53 +0800 271) -2f36662750f include/server/vnode/vnode.h (Shengliang Guan 2021-11-01 19:49:44 +0800 272) int32_t vnodeAlter(SVnode *pVnode, const SVnodeCfg *pCfg); -2f36662750f include/server/vnode/vnode.h (Shengliang Guan 2021-11-01 19:49:44 +0800 273) int32_t vnodeCompact(SVnode *pVnode); -2f36662750f include/server/vnode/vnode.h (Shengliang Guan 2021-11-01 19:49:44 +0800 274) int32_t vnodeSync(SVnode *pVnode); -dd3281c9d2f include/server/vnode/vnode.h (Shengliang Guan 2021-11-04 18:38:07 +0800 275) int32_t vnodeGetLoad(SVnode *pVnode, SVnodeLoad *pLoad); -2f09d49aa4c include/server/vnode/vnode.h (Shengliang Guan 2021-11-04 14:06:29 +0800 276) -a038c466075 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-02-15 10:11:34 +0800 277) /* ------------------------- TQ READ --------------------------- */ -35749cb3742 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-21 16:12:02 +0800 278) -913e8d70d87 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-09 10:49:42 +0800 279) enum { -913e8d70d87 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-09 10:49:42 +0800 280) TQ_STREAM_TOKEN__DATA = 1, -913e8d70d87 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-09 10:49:42 +0800 281) TQ_STREAM_TOKEN__WATERMARK, -913e8d70d87 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-09 10:49:42 +0800 282) TQ_STREAM_TOKEN__CHECKPOINT, -913e8d70d87 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-09 10:49:42 +0800 283) }; -913e8d70d87 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-09 10:49:42 +0800 284) -913e8d70d87 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-09 10:49:42 +0800 285) typedef struct { -913e8d70d87 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-09 10:49:42 +0800 286) int8_t type; -913e8d70d87 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-09 10:49:42 +0800 287) int8_t reserved[7]; -913e8d70d87 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-09 10:49:42 +0800 288) union { -913e8d70d87 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-09 10:49:42 +0800 289) void *data; -913e8d70d87 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-09 10:49:42 +0800 290) int64_t wmTs; -913e8d70d87 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-09 10:49:42 +0800 291) int64_t checkpointId; -913e8d70d87 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-09 10:49:42 +0800 292) }; -913e8d70d87 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-09 10:49:42 +0800 293) } STqStreamToken; -913e8d70d87 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-09 10:49:42 +0800 294) -5bb010ef4af source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-28 15:24:09 +0800 295) STqReadHandle *tqInitSubmitMsgScanner(SMeta *pMeta); -35749cb3742 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-21 16:12:02 +0800 296) -5bb010ef4af source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-28 15:24:09 +0800 297) static FORCE_INLINE void tqReadHandleSetColIdList(STqReadHandle *pReadHandle, SArray *pColIdList) { -a1c6c94c0b3 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-21 19:00:09 +0800 298) pReadHandle->pColIdList = pColIdList; -a1c6c94c0b3 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-21 19:00:09 +0800 299) } -a1c6c94c0b3 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-21 19:00:09 +0800 300) -a038c466075 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-02-15 10:11:34 +0800 301) // static FORCE_INLINE void tqReadHandleSetTbUid(STqReadHandle* pHandle, int64_t tbUid) { -a038c466075 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-02-15 10:11:34 +0800 302) // pHandle->tbUid = tbUid; -60a1ae8ce4c source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-28 13:31:46 +0800 303) //} -35749cb3742 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-21 16:12:02 +0800 304) -5bb010ef4af source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-28 15:24:09 +0800 305) static FORCE_INLINE int tqReadHandleSetTbUidList(STqReadHandle *pHandle, const SArray *tbUidList) { -b7788aca04f source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-02 16:22:43 +0800 306) if (pHandle->tbIdHash) { -b7788aca04f source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-02 16:22:43 +0800 307) taosHashClear(pHandle->tbIdHash); -b7788aca04f source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-02 16:22:43 +0800 308) } -b7788aca04f source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-02 16:22:43 +0800 309) -a038c466075 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-02-15 10:11:34 +0800 310) pHandle->tbIdHash = taosHashInit(64, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BIGINT), true, HASH_NO_LOCK); -963fb9b9f61 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-27 18:05:23 +0800 311) if (pHandle->tbIdHash == NULL) { -36aedfbb7cd source/dnode/vnode/inc/vnode.h (Haojun Liao 2022-02-17 15:24:00 +0800 312) terrno = TSDB_CODE_OUT_OF_MEMORY; -963fb9b9f61 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-27 18:05:23 +0800 313) return -1; -963fb9b9f61 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-27 18:05:23 +0800 314) } -36aedfbb7cd source/dnode/vnode/inc/vnode.h (Haojun Liao 2022-02-17 15:24:00 +0800 315) -963fb9b9f61 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-27 18:05:23 +0800 316) for (int i = 0; i < taosArrayGetSize(tbUidList); i++) { -5bb010ef4af source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-28 15:24:09 +0800 317) int64_t *pKey = (int64_t *)taosArrayGet(tbUidList, i); -963fb9b9f61 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-27 18:05:23 +0800 318) taosHashPut(pHandle->tbIdHash, pKey, sizeof(int64_t), NULL, 0); -963fb9b9f61 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-27 18:05:23 +0800 319) } -36aedfbb7cd source/dnode/vnode/inc/vnode.h (Haojun Liao 2022-02-17 15:24:00 +0800 320) -963fb9b9f61 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-27 18:05:23 +0800 321) return 0; -963fb9b9f61 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-27 18:05:23 +0800 322) } -963fb9b9f61 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-27 18:05:23 +0800 323) -b7788aca04f source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-02 16:22:43 +0800 324) static FORCE_INLINE int tqReadHandleAddTbUidList(STqReadHandle *pHandle, const SArray *tbUidList) { -b7788aca04f source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-02 16:22:43 +0800 325) if (pHandle->tbIdHash == NULL) { -b7788aca04f source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-02 16:22:43 +0800 326) pHandle->tbIdHash = taosHashInit(64, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BIGINT), true, HASH_NO_LOCK); -b7788aca04f source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-02 16:22:43 +0800 327) if (pHandle->tbIdHash == NULL) { -b7788aca04f source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-02 16:22:43 +0800 328) terrno = TSDB_CODE_OUT_OF_MEMORY; -b7788aca04f source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-02 16:22:43 +0800 329) return -1; -b7788aca04f source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-02 16:22:43 +0800 330) } -b7788aca04f source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-02 16:22:43 +0800 331) } -b7788aca04f source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-02 16:22:43 +0800 332) -b7788aca04f source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-02 16:22:43 +0800 333) for (int i = 0; i < taosArrayGetSize(tbUidList); i++) { -b7788aca04f source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-02 16:22:43 +0800 334) int64_t *pKey = (int64_t *)taosArrayGet(tbUidList, i); -b7788aca04f source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-02 16:22:43 +0800 335) taosHashPut(pHandle->tbIdHash, pKey, sizeof(int64_t), NULL, 0); -b7788aca04f source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-02 16:22:43 +0800 336) } -b7788aca04f source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-02 16:22:43 +0800 337) -b7788aca04f source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-02 16:22:43 +0800 338) return 0; -b7788aca04f source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-02 16:22:43 +0800 339) } -b7788aca04f source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-03-02 16:22:43 +0800 340) -7ee6657cf72 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-02-21 10:48:23 +0800 341) int32_t tqReadHandleSetMsg(STqReadHandle *pHandle, SSubmitReq *pMsg, int64_t ver); -7ee6657cf72 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-02-21 10:48:23 +0800 342) bool tqNextDataBlock(STqReadHandle *pHandle); -7ee6657cf72 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-02-21 10:48:23 +0800 343) int tqRetrieveDataBlockInfo(STqReadHandle *pHandle, SDataBlockInfo *pBlockInfo); -35749cb3742 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-21 16:12:02 +0800 344) // return SArray -5bb010ef4af source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-28 15:24:09 +0800 345) SArray *tqRetrieveDataBlock(STqReadHandle *pHandle); -35749cb3742 source/dnode/vnode/inc/vnode.h (Liu Jicong 2022-01-21 16:12:02 +0800 346) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 347) // meta.h -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 348) SMeta *metaOpen(const char *path, const SMetaCfg *pMetaCfg, SMemAllocatorFactory *pMAF); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 349) void metaClose(SMeta *pMeta); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 350) void metaRemove(const char *path); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 351) int metaCreateTable(SMeta *pMeta, STbCfg *pTbCfg); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 352) int metaDropTable(SMeta *pMeta, tb_uid_t uid); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 353) int metaCommit(SMeta *pMeta); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 354) int32_t metaCreateTSma(SMeta *pMeta, SSmaCfg *pCfg); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 355) int32_t metaDropTSma(SMeta *pMeta, int64_t indexUid); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 356) STbCfg *metaGetTbInfoByUid(SMeta *pMeta, tb_uid_t uid); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 357) STbCfg *metaGetTbInfoByName(SMeta *pMeta, char *tbname, tb_uid_t *uid); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 358) SSchemaWrapper *metaGetTableSchema(SMeta *pMeta, tb_uid_t uid, int32_t sver, bool isinline); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 359) STSchema *metaGetTbTSchema(SMeta *pMeta, tb_uid_t uid, int32_t sver); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 360) STSma *metaGetSmaInfoByIndex(SMeta *pMeta, int64_t indexUid); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 361) STSmaWrapper *metaGetSmaInfoByTable(SMeta *pMeta, tb_uid_t uid); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 362) SArray *metaGetSmaTbUids(SMeta *pMeta, bool isDup); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 363) int metaGetTbNum(SMeta *pMeta); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 364) SMTbCursor *metaOpenTbCursor(SMeta *pMeta); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 365) void metaCloseTbCursor(SMTbCursor *pTbCur); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 366) char *metaTbCursorNext(SMTbCursor *pTbCur); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 367) SMCtbCursor *metaOpenCtbCursor(SMeta *pMeta, tb_uid_t uid); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 368) void metaCloseCtbCurosr(SMCtbCursor *pCtbCur); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 369) tb_uid_t metaCtbCursorNext(SMCtbCursor *pCtbCur); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 370) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 371) SMSmaCursor *metaOpenSmaCursor(SMeta *pMeta, tb_uid_t uid); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 372) void metaCloseSmaCurosr(SMSmaCursor *pSmaCur); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 373) const char *metaSmaCursorNext(SMSmaCursor *pSmaCur); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 374) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 375) // Options -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 376) void metaOptionsInit(SMetaCfg *pMetaCfg); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 377) void metaOptionsClear(SMetaCfg *pMetaCfg); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 378) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 379) // query condition to build multi-table data block iterator -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 380) // STsdb -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 381) STsdb *tsdbOpen(const char *path, int32_t vgId, const STsdbCfg *pTsdbCfg, SMemAllocatorFactory *pMAF, SMeta *pMeta, STfs *pTfs); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 382) void tsdbClose(STsdb *); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 383) void tsdbRemove(const char *path); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 384) int tsdbInsertData(STsdb *pTsdb, SSubmitReq *pMsg, SSubmitRsp *pRsp); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 385) int tsdbPrepareCommit(STsdb *pTsdb); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 386) int tsdbCommit(STsdb *pTsdb); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 387) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 388) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 389) int32_t tsdbInitSma(STsdb *pTsdb); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 390) int32_t tsdbCreateTSma(STsdb *pTsdb, char *pMsg); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 391) int32_t tsdbDropTSma(STsdb *pTsdb, char *pMsg); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 392) /** -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 393) * @brief When submit msg received, update the relative expired window synchronously. -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 394) * -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 395) * @param pTsdb -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 396) * @param msg -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 397) * @return int32_t -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 398) */ -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 399) int32_t tsdbUpdateSmaWindow(STsdb *pTsdb, SSubmitReq *pMsg); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 400) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 401) /** -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 402) * @brief Insert tSma(Time-range-wise SMA) data from stream computing engine -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 403) * -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 404) * @param pTsdb -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 405) * @param indexUid -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 406) * @param msg -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 407) * @return int32_t -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 408) */ -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 409) int32_t tsdbInsertTSmaData(STsdb *pTsdb, int64_t indexUid, const char *msg); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 410) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 411) /** -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 412) * @brief Drop tSma data and local cache. -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 413) * -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 414) * @param pTsdb -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 415) * @param indexUid -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 416) * @return int32_t -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 417) */ -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 418) int32_t tsdbDropTSmaData(STsdb *pTsdb, int64_t indexUid); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 419) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 420) /** -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 421) * @brief Insert RSma(Rollup SMA) data. -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 422) * -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 423) * @param pTsdb -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 424) * @param msg -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 425) * @return int32_t -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 426) */ -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 427) int32_t tsdbInsertRSmaData(STsdb *pTsdb, char *msg); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 428) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 429) // TODO: This is the basic params, and should wrap the params to a queryHandle. -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 430) /** -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 431) * @brief Get tSma(Time-range-wise SMA) data. -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 432) * -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 433) * @param pTsdb -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 434) * @param pData -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 435) * @param indexUid -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 436) * @param querySKey -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 437) * @param nMaxResult -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 438) * @return int32_t -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 439) */ -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 440) int32_t tsdbGetTSmaData(STsdb *pTsdb, char *pData, int64_t indexUid, TSKEY querySKey, int32_t nMaxResult); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 441) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 442) // STsdbCfg -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 443) int tsdbOptionsInit(STsdbCfg *); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 444) void tsdbOptionsClear(STsdbCfg *); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 445) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 446) typedef void* tsdbReaderT; -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 447) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 448) /** -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 449) * Get the data block iterator, starting from position according to the query condition -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 450) * -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 451) * @param tsdb tsdb handle -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 452) * @param pCond query condition, including time window, result set order, and basic required columns for each block -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 453) * @param tableInfoGroup table object list in the form of set, grouped into different sets according to the -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 454) * group by condition -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 455) * @param qinfo query info handle from query processor -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 456) * @return -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 457) */ -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 458) tsdbReaderT *tsdbQueryTables(STsdb *tsdb, STsdbQueryCond *pCond, STableGroupInfo *tableInfoGroup, uint64_t qId, uint64_t taskId); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 459) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 460) /** -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 461) * Get the last row of the given query time window for all the tables in STableGroupInfo object. -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 462) * Note that only one data block with only row will be returned while invoking retrieve data block function for -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 463) * all tables in this group. -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 464) * -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 465) * @param tsdb tsdb handle -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 466) * @param pCond query condition, including time window, result set order, and basic required columns for each block -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 467) * @param tableInfo table list. -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 468) * @return -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 469) */ -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 470) //tsdbReaderT tsdbQueryLastRow(STsdbRepo *tsdb, STsdbQueryCond *pCond, STableGroupInfo *tableInfo, uint64_t qId, -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 471) // SMemRef *pRef); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 472) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 473) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 474) tsdbReaderT tsdbQueryCacheLast(STsdb *tsdb, STsdbQueryCond *pCond, STableGroupInfo *groupList, uint64_t qId, void* pMemRef); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 475) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 476) int32_t tsdbGetFileBlocksDistInfo(tsdbReaderT* pReader, STableBlockDistInfo* pTableBlockInfo); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 477) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 478) bool isTsdbCacheLastRow(tsdbReaderT* pReader); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 479) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 480) /** -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 481) * -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 482) * @param tsdb -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 483) * @param uid -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 484) * @param skey -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 485) * @param pTagCond -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 486) * @param len -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 487) * @param tagNameRelType -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 488) * @param tbnameCond -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 489) * @param pGroupInfo -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 490) * @param pColIndex -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 491) * @param numOfCols -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 492) * @param reqId -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 493) * @return -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 494) */ -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 495) int32_t tsdbQuerySTableByTagCond(void* pMeta, uint64_t uid, TSKEY skey, const char* pTagCond, size_t len, -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 496) int16_t tagNameRelType, const char* tbnameCond, STableGroupInfo* pGroupInfo, -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 497) SColIndex* pColIndex, int32_t numOfCols, uint64_t reqId, uint64_t taskId); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 498) /** -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 499) * get num of rows in mem table -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 500) * -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 501) * @param pHandle -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 502) * @return row size -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 503) */ -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 504) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 505) int64_t tsdbGetNumOfRowsInMemTable(tsdbReaderT* pHandle); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 506) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 507) /** -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 508) * move to next block if exists -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 509) * -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 510) * @param pTsdbReadHandle -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 511) * @return -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 512) */ -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 513) bool tsdbNextDataBlock(tsdbReaderT pTsdbReadHandle); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 514) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 515) /** -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 516) * Get current data block information -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 517) * -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 518) * @param pTsdbReadHandle -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 519) * @param pBlockInfo -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 520) * @return -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 521) */ -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 522) void tsdbRetrieveDataBlockInfo(tsdbReaderT *pTsdbReadHandle, SDataBlockInfo *pBlockInfo); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 523) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 524) /** -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 525) * -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 526) * Get the pre-calculated information w.r.t. current data block. -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 527) * -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 528) * In case of data block in cache, the pBlockStatis will always be NULL. -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 529) * If a block is not completed loaded from disk, the pBlockStatis will be NULL. -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 530) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 531) * @pBlockStatis the pre-calculated value for current data blocks. if the block is a cache block, always return 0 -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 532) * @return -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 533) */ -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 534) int32_t tsdbRetrieveDataBlockStatisInfo(tsdbReaderT *pTsdbReadHandle, SDataStatis **pBlockStatis); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 535) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 536) /** -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 537) * -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 538) * The query condition with primary timestamp is passed to iterator during its constructor function, -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 539) * the returned data block must be satisfied with the time window condition in any cases, -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 540) * which means the SData data block is not actually the completed disk data blocks. -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 541) * -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 542) * @param pTsdbReadHandle query handle -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 543) * @param pColumnIdList required data columns id list -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 544) * @return -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 545) */ -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 546) SArray *tsdbRetrieveDataBlock(tsdbReaderT *pTsdbReadHandle, SArray *pColumnIdList); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 547) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 548) /** -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 549) * destroy the created table group list, which is generated by tag query -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 550) * @param pGroupList -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 551) */ -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 552) void tsdbDestroyTableGroup(STableGroupInfo *pGroupList); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 553) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 554) /** -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 555) * create the table group result including only one table, used to handle the normal table query -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 556) * -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 557) * @param tsdb tsdbHandle -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 558) * @param uid table uid -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 559) * @param pGroupInfo the generated result -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 560) * @return -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 561) */ -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 562) int32_t tsdbGetOneTableGroup(void *pMeta, uint64_t uid, TSKEY startKey, STableGroupInfo *pGroupInfo); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 563) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 564) /** -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 565) * -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 566) * @param tsdb -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 567) * @param pTableIdList -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 568) * @param pGroupInfo -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 569) * @return -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 570) */ -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 571) int32_t tsdbGetTableGroupFromIdList(STsdb *tsdb, SArray *pTableIdList, STableGroupInfo *pGroupInfo); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 572) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 573) /** -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 574) * clean up the query handle -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 575) * @param queryHandle -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 576) */ -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 577) void tsdbCleanupReadHandle(tsdbReaderT queryHandle); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 578) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 579) int32_t tdScanAndConvertSubmitMsg(SSubmitReq *pMsg); -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 580) -6faaafb7a2f source/dnode/vnode/inc/vnode.h (Hongze Cheng 2022-04-08 06:09:15 +0000 581) -ce7a1600eb4 include/server/vnode/vnode.h (Shengliang Guan 2021-09-22 20:29:24 +0800 582) #ifdef __cplusplus -ce7a1600eb4 include/server/vnode/vnode.h (Shengliang Guan 2021-09-22 20:29:24 +0800 583) } -ce7a1600eb4 include/server/vnode/vnode.h (Shengliang Guan 2021-09-22 20:29:24 +0800 584) #endif -ce7a1600eb4 include/server/vnode/vnode.h (Shengliang Guan 2021-09-22 20:29:24 +0800 585) -daafc0feb7f include/server/vnode/vnode.h (Shengliang Guan 2021-09-29 19:26:11 +0800 586) #endif /*_TD_VNODE_H_*/ diff --git a/source/dnode/vnode/src/vnd/vnodeQuery.c b/source/dnode/vnode/src/vnd/vnodeQuery.c index 3747e1dbc7..6280542ffe 100644 --- a/source/dnode/vnode/src/vnd/vnodeQuery.c +++ b/source/dnode/vnode/src/vnd/vnodeQuery.c @@ -22,21 +22,21 @@ int vnodeQueryOpen(SVnode *pVnode) { void vnodeQueryClose(SVnode *pVnode) { qWorkerDestroy((void **)&pVnode->pQuery); } int vnodeGetTableMeta(SVnode *pVnode, SRpcMsg *pMsg) { - STbCfg *pTbCfg = NULL; - STbCfg *pStbCfg = NULL; + STbCfg * pTbCfg = NULL; + STbCfg * pStbCfg = NULL; tb_uid_t uid; int32_t nCols; int32_t nTagCols; SSchemaWrapper *pSW = NULL; - STableMetaRsp *pTbMetaMsg = NULL; + STableMetaRsp * pTbMetaMsg = NULL; STableMetaRsp metaRsp = {0}; - SSchema *pTagSchema; + SSchema * pTagSchema; SRpcMsg rpcMsg; int msgLen = 0; int32_t code = 0; char tableFName[TSDB_TABLE_FNAME_LEN]; int32_t rspLen = 0; - void *pRsp = NULL; + void * pRsp = NULL; STableInfoReq infoReq = {0}; if (tDeserializeSTableInfoReq(pMsg->pCont, pMsg->contLen, &infoReq) != 0) { @@ -142,6 +142,7 @@ _exit: rpcMsg.handle = pMsg->handle; rpcMsg.ahandle = pMsg->ahandle; + rpcMsg.refId = pMsg->refId; rpcMsg.pCont = pRsp; rpcMsg.contLen = rspLen; rpcMsg.code = code; diff --git a/source/libs/transport/src/transSrv.c b/source/libs/transport/src/transSrv.c index 6bb8e0c1c5..9ba84c21b5 100644 --- a/source/libs/transport/src/transSrv.c +++ b/source/libs/transport/src/transSrv.c @@ -1017,9 +1017,11 @@ void transReleaseSrvHandle(void* handle) { uvReleaseExHandle(refId); return; _return1: + tTrace("server handle %p failed to send to release handle", exh); uvReleaseExHandle(refId); return; _return2: + tTrace("server handle %p failed to send to release handle", exh); return; } void transSendResponse(const STransMsg* msg) { @@ -1041,10 +1043,12 @@ void transSendResponse(const STransMsg* msg) { uvReleaseExHandle(refId); return; _return1: + tTrace("server handle %p failed to send resp", exh); rpcFreeCont(msg->pCont); uvReleaseExHandle(refId); return; _return2: + tTrace("server handle %p failed to send resp", exh); rpcFreeCont(msg->pCont); return; } @@ -1067,10 +1071,12 @@ void transRegisterMsg(const STransMsg* msg) { uvReleaseExHandle(refId); return; _return1: + tTrace("server handle %p failed to send to register brokenlink", exh); rpcFreeCont(msg->pCont); uvReleaseExHandle(refId); return; _return2: + tTrace("server handle %p failed to send to register brokenlink", exh); rpcFreeCont(msg->pCont); } -- GitLab