提交 453590e2 编写于 作者: S Shengliang Guan

[TD-335] sort include file

上级 966fb020
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include "ttime.h" #include "ttime.h"
#define jniError(...) { if (jniDebugFlag & DEBUG_ERROR) { taosPrintLog("ERROR JNI ", jniDebugFlag, __VA_ARGS__); }} #define jniError(...) { if (jniDebugFlag & DEBUG_ERROR) { taosPrintLog("ERROR JNI ", jniDebugFlag, __VA_ARGS__); }}
#define jniWarn(...) { if (jniDebugFlag & DEBUG_WARN) { taosPrintLog("WARN JNI ", jniDebugFlag, __VA_ARGS__); }} #define jniWarn(...) { if (jniDebugFlag & DEBUG_WARN) { taosPrintLog("WARN JNI ", jniDebugFlag, __VA_ARGS__); }}
#define jniTrace(...) { if (jniDebugFlag & DEBUG_TRACE) { taosPrintLog("JNI ", jniDebugFlag, __VA_ARGS__); }} #define jniTrace(...) { if (jniDebugFlag & DEBUG_TRACE) { taosPrintLog("JNI ", jniDebugFlag, __VA_ARGS__); }}
#define jniPrint(...) { taosPrintLog("JNI ", tscEmbedded ? 255 : uDebugFlag, __VA_ARGS__); } #define jniPrint(...) { taosPrintLog("JNI ", tscEmbedded ? 255 : uDebugFlag, __VA_ARGS__); }
......
...@@ -26,7 +26,7 @@ extern int32_t uDebugFlag; ...@@ -26,7 +26,7 @@ extern int32_t uDebugFlag;
extern int32_t tscEmbedded; extern int32_t tscEmbedded;
#define uError(...) { if (uDebugFlag & DEBUG_ERROR) { taosPrintLog("ERROR UTL ", uDebugFlag, __VA_ARGS__); }} #define uError(...) { if (uDebugFlag & DEBUG_ERROR) { taosPrintLog("ERROR UTL ", uDebugFlag, __VA_ARGS__); }}
#define uWarn(...) { if (uDebugFlag & DEBUG_WARN) { taosPrintLog("WARN UTL ", uDebugFlag, __VA_ARGS__); }} #define uWarn(...) { if (uDebugFlag & DEBUG_WARN) { taosPrintLog("WARN UTL ", uDebugFlag, __VA_ARGS__); }}
#define uTrace(...) { if (uDebugFlag & DEBUG_TRACE) { taosPrintLog("UTL ", uDebugFlag, __VA_ARGS__); }} #define uTrace(...) { if (uDebugFlag & DEBUG_TRACE) { taosPrintLog("UTL ", uDebugFlag, __VA_ARGS__); }}
#define uDump(x, y) { if (uDebugFlag & DEBUG_DUMP) { taosDumpData(x, y); }} #define uDump(x, y) { if (uDebugFlag & DEBUG_DUMP) { taosDumpData(x, y); }}
#define uPrint(...) { taosPrintLog("UTL ", tscEmbedded ? 255 : uDebugFlag, __VA_ARGS__); } #define uPrint(...) { taosPrintLog("UTL ", tscEmbedded ? 255 : uDebugFlag, __VA_ARGS__); }
......
...@@ -25,7 +25,7 @@ extern "C" { ...@@ -25,7 +25,7 @@ extern "C" {
extern int32_t dDebugFlag; extern int32_t dDebugFlag;
#define dError(...) { if (dDebugFlag & DEBUG_ERROR) { taosPrintLog("ERROR DND ", 255, __VA_ARGS__); }} #define dError(...) { if (dDebugFlag & DEBUG_ERROR) { taosPrintLog("ERROR DND ", 255, __VA_ARGS__); }}
#define dWarn(...) { if (dDebugFlag & DEBUG_WARN) { taosPrintLog("WARN DND ", dDebugFlag, __VA_ARGS__); }} #define dWarn(...) { if (dDebugFlag & DEBUG_WARN) { taosPrintLog("WARN DND ", dDebugFlag, __VA_ARGS__); }}
#define dTrace(...) { if (dDebugFlag & DEBUG_TRACE) { taosPrintLog("DND ", dDebugFlag, __VA_ARGS__); }} #define dTrace(...) { if (dDebugFlag & DEBUG_TRACE) { taosPrintLog("DND ", dDebugFlag, __VA_ARGS__); }}
#define dPrint(...) { taosPrintLog("DND ", 255, __VA_ARGS__); } #define dPrint(...) { taosPrintLog("DND ", 255, __VA_ARGS__); }
......
...@@ -21,7 +21,7 @@ extern "C" { ...@@ -21,7 +21,7 @@ extern "C" {
#endif #endif
int32_t dnodeInitSystem(); int32_t dnodeInitSystem();
void dnodeCleanUpSystem(); void dnodeCleanUpSystem();
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -34,7 +34,7 @@ void dnodeReleaseVnode(void *pVnode); ...@@ -34,7 +34,7 @@ void dnodeReleaseVnode(void *pVnode);
void dnodeSendRedirectMsg(SRpcMsg *rpcMsg, bool forShell); void dnodeSendRedirectMsg(SRpcMsg *rpcMsg, bool forShell);
void dnodeGetMnodeIpSetForPeer(void *ipSet); void dnodeGetMnodeIpSetForPeer(void *ipSet);
void dnodeGetMnodeIpSetForShell(void *ipSe); void dnodeGetMnodeIpSetForShell(void *ipSet);
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef TDENGINE_DNODE_DNODE_H #ifndef TDENGINE_DNODE_PEER_H
#define TDENGINE_DNODE_DNODE_H #define TDENGINE_DNODE_PEER_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include "taosmsg.h" #include "taosmsg.h"
#include "tutil.h" #include "tutil.h"
#include "tqueue.h" #include "tqueue.h"
#include "trpc.h"
#include "twal.h" #include "twal.h"
#include "tglobal.h" #include "tglobal.h"
#include "mnode.h" #include "mnode.h"
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include "taosmsg.h" #include "taosmsg.h"
#include "tutil.h" #include "tutil.h"
#include "tqueue.h" #include "tqueue.h"
#include "trpc.h"
#include "twal.h" #include "twal.h"
#include "tglobal.h" #include "tglobal.h"
#include "mnode.h" #include "mnode.h"
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#include "tutil.h" #include "tutil.h"
#include "ttimer.h" #include "ttimer.h"
#include "tqueue.h" #include "tqueue.h"
#include "trpc.h"
#include "twal.h" #include "twal.h"
#include "tglobal.h" #include "tglobal.h"
#include "mnode.h" #include "mnode.h"
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#include "taosmsg.h" #include "taosmsg.h"
#include "ttime.h" #include "ttime.h"
#include "ttimer.h" #include "ttimer.h"
#include "trpc.h"
#include "tsdb.h" #include "tsdb.h"
#include "twal.h" #include "twal.h"
#include "tsync.h" #include "tsync.h"
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#include "os.h" #include "os.h"
#include "taosdef.h" #include "taosdef.h"
#include "tglobal.h" #include "tglobal.h"
#include "trpc.h"
#include "mnode.h" #include "mnode.h"
#include "http.h" #include "http.h"
#include "mqtt.h" #include "mqtt.h"
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#include "os.h" #include "os.h"
#include "taosmsg.h" #include "taosmsg.h"
#include "tglobal.h" #include "tglobal.h"
#include "trpc.h"
#include "mnode.h" #include "mnode.h"
#include "dnode.h" #include "dnode.h"
#include "dnodeInt.h" #include "dnodeInt.h"
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include "taoserror.h" #include "taoserror.h"
#include "taosdef.h" #include "taosdef.h"
#include "taosmsg.h" #include "taosmsg.h"
#include "trpc.h"
#include "tglobal.h" #include "tglobal.h"
#include "http.h" #include "http.h"
#include "mnode.h" #include "mnode.h"
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include "taosmsg.h" #include "taosmsg.h"
#include "tutil.h" #include "tutil.h"
#include "tqueue.h" #include "tqueue.h"
#include "trpc.h"
#include "twal.h" #include "twal.h"
#include "tglobal.h" #include "tglobal.h"
#include "dnodeInt.h" #include "dnodeInt.h"
...@@ -142,7 +141,7 @@ void dnodeDispatchToVnodeReadQueue(SRpcMsg *pMsg) { ...@@ -142,7 +141,7 @@ void dnodeDispatchToVnodeReadQueue(SRpcMsg *pMsg) {
} }
} }
void *dnodeAllocateRqueue(void *pVnode) { void *dnodeAllocateVnodeRqueue(void *pVnode) {
taos_queue queue = taosOpenQueue(); taos_queue queue = taosOpenQueue();
if (queue == NULL) return NULL; if (queue == NULL) return NULL;
...@@ -172,7 +171,7 @@ void *dnodeAllocateRqueue(void *pVnode) { ...@@ -172,7 +171,7 @@ void *dnodeAllocateRqueue(void *pVnode) {
return queue; return queue;
} }
void dnodeFreeRqueue(void *rqueue) { void dnodeFreeVnodeRqueue(void *rqueue) {
taosCloseQueue(rqueue); taosCloseQueue(rqueue);
// dynamically adjust the number of threads // dynamically adjust the number of threads
......
...@@ -22,9 +22,9 @@ ...@@ -22,9 +22,9 @@
#include "trpc.h" #include "trpc.h"
#include "tsdb.h" #include "tsdb.h"
#include "twal.h" #include "twal.h"
#include "tdataformat.h"
#include "tglobal.h" #include "tglobal.h"
#include "vnode.h" #include "vnode.h"
#include "tdataformat.h"
#include "dnodeInt.h" #include "dnodeInt.h"
#include "dnodeVWrite.h" #include "dnodeVWrite.h"
#include "dnodeMgmt.h" #include "dnodeMgmt.h"
...@@ -122,7 +122,7 @@ void dnodeDispatchToVnodeWriteQueue(SRpcMsg *pMsg) { ...@@ -122,7 +122,7 @@ void dnodeDispatchToVnodeWriteQueue(SRpcMsg *pMsg) {
} }
} }
void *dnodeAllocateWqueue(void *pVnode) { void *dnodeAllocateVnodeWqueue(void *pVnode) {
SWriteWorker *pWorker = wWorkerPool.writeWorker + wWorkerPool.nextId; SWriteWorker *pWorker = wWorkerPool.writeWorker + wWorkerPool.nextId;
void *queue = taosOpenQueue(); void *queue = taosOpenQueue();
if (queue == NULL) return NULL; if (queue == NULL) return NULL;
...@@ -157,13 +157,13 @@ void *dnodeAllocateWqueue(void *pVnode) { ...@@ -157,13 +157,13 @@ void *dnodeAllocateWqueue(void *pVnode) {
return queue; return queue;
} }
void dnodeFreeWqueue(void *wqueue) { void dnodeFreeVnodeWqueue(void *wqueue) {
taosCloseQueue(wqueue); taosCloseQueue(wqueue);
// dynamically adjust the number of threads // dynamically adjust the number of threads
} }
void dnodeSendRpcWriteRsp(void *pVnode, void *param, int32_t code) { void dnodeSendRpcVnodeWriteRsp(void *pVnode, void *param, int32_t code) {
SWriteMsg *pWrite = (SWriteMsg *)param; SWriteMsg *pWrite = (SWriteMsg *)param;
if (code > 0) return; if (code > 0) return;
...@@ -223,7 +223,7 @@ static void *dnodeProcessWriteQueue(void *param) { ...@@ -223,7 +223,7 @@ static void *dnodeProcessWriteQueue(void *param) {
taosGetQitem(pWorker->qall, &type, &item); taosGetQitem(pWorker->qall, &type, &item);
if (type == TAOS_QTYPE_RPC) { if (type == TAOS_QTYPE_RPC) {
pWrite = (SWriteMsg *)item; pWrite = (SWriteMsg *)item;
dnodeSendRpcWriteRsp(pVnode, item, pWrite->rpcMsg.code); dnodeSendRpcVnodeWriteRsp(pVnode, item, pWrite->rpcMsg.code);
} else { } else {
taosFreeQitem(item); taosFreeQitem(item);
vnodeRelease(pVnode); vnodeRelease(pVnode);
......
...@@ -37,12 +37,6 @@ typedef enum { ...@@ -37,12 +37,6 @@ typedef enum {
SDnodeRunStatus dnodeGetRunStatus(); SDnodeRunStatus dnodeGetRunStatus();
SDnodeStatisInfo dnodeGetStatisInfo(); SDnodeStatisInfo dnodeGetStatisInfo();
void *dnodeAllocateWqueue(void *pVnode);
void dnodeFreeWqueue(void *queue);
void *dnodeAllocateRqueue(void *pVnode);
void dnodeFreeRqueue(void *rqueue);
void dnodeSendRpcWriteRsp(void *pVnode, void *param, int32_t code);
bool dnodeIsFirstDeploy(); bool dnodeIsFirstDeploy();
char * dnodeGetMnodeMasterEp(); char * dnodeGetMnodeMasterEp();
void dnodeGetMnodeIpSetForPeer(void *ipSet); void dnodeGetMnodeIpSetForPeer(void *ipSet);
...@@ -54,16 +48,21 @@ void dnodeAddClientRspHandle(uint8_t msgType, void (*fp)(SRpcMsg *rpcMsg)); ...@@ -54,16 +48,21 @@ void dnodeAddClientRspHandle(uint8_t msgType, void (*fp)(SRpcMsg *rpcMsg));
void dnodeSendMsgToDnode(SRpcIpSet *ipSet, SRpcMsg *rpcMsg); void dnodeSendMsgToDnode(SRpcIpSet *ipSet, SRpcMsg *rpcMsg);
void dnodeSendMsgToDnodeRecv(SRpcMsg *rpcMsg, SRpcMsg *rpcRsp); void dnodeSendMsgToDnodeRecv(SRpcMsg *rpcMsg, SRpcMsg *rpcRsp);
int32_t dnodeAllocateMnodeWqueue(); void *dnodeAllocateVnodeWqueue(void *pVnode);
void dnodeFreeMnodeWqueue(); void dnodeFreeVnodeWqueue(void *queue);
int32_t dnodeAllocateMnodeRqueue(); void *dnodeAllocateVnodeRqueue(void *pVnode);
void dnodeFreeMnodeRqueue(); void dnodeFreeVnodeRqueue(void *rqueue);
void dnodeSendRpcVnodeWriteRsp(void *pVnode, void *param, int32_t code);
int32_t dnodeAllocateMnodePqueue(); int32_t dnodeAllocateMnodePqueue();
void dnodeFreeMnodePqueue(); void dnodeFreeMnodePqueue();
int32_t dnodeAllocateMnodeRqueue();
void dnodeSendRpcMnodeWriteRsp(void *pMsg, int32_t code); void dnodeFreeMnodeRqueue();
void dnodeReprocessMnodeWriteMsg(void *pMsg); int32_t dnodeAllocateMnodeWqueue();
void dnodeDelayReprocessMnodeWriteMsg(void *pMsg); void dnodeFreeMnodeWqueue();
void dnodeSendRpcMnodeWriteRsp(void *pMsg, int32_t code);
void dnodeReprocessMnodeWriteMsg(void *pMsg);
void dnodeDelayReprocessMnodeWriteMsg(void *pMsg);
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -20,13 +20,14 @@ ...@@ -20,13 +20,14 @@
extern "C" { extern "C" {
#endif #endif
#include "trpc.h"
struct SAcctObj; struct SAcctObj;
struct SDnodeObj; struct SDnodeObj;
struct SUserObj; struct SUserObj;
struct SDbObj; struct SDbObj;
struct SVgObj; struct SVgObj;
struct STableObj; struct STableObj;
struct SRpcMsg;
typedef struct { typedef struct {
int32_t len; int32_t len;
...@@ -34,13 +35,13 @@ typedef struct { ...@@ -34,13 +35,13 @@ typedef struct {
} SMnodeRsp; } SMnodeRsp;
typedef struct SMnodeMsg { typedef struct SMnodeMsg {
SRpcMsg rpcMsg;
SMnodeRsp rpcRsp; SMnodeRsp rpcRsp;
int8_t received; int8_t received;
int8_t successed; int8_t successed;
int8_t expected; int8_t expected;
int8_t retry; int8_t retry;
int32_t code; int32_t code;
struct SRpcMsg rpcMsg;
struct SAcctObj * pAcct; struct SAcctObj * pAcct;
struct SDnodeObj *pDnode; struct SDnodeObj *pDnode;
struct SUserObj * pUser; struct SUserObj * pUser;
...@@ -49,7 +50,7 @@ typedef struct SMnodeMsg { ...@@ -49,7 +50,7 @@ typedef struct SMnodeMsg {
struct STableObj *pTable; struct STableObj *pTable;
} SMnodeMsg; } SMnodeMsg;
void mnodeCreateMsg(SMnodeMsg *pMsg, struct SRpcMsg *rpcMsg); void mnodeCreateMsg(SMnodeMsg *pMsg, SRpcMsg *rpcMsg);
int32_t mnodeInitMsg(SMnodeMsg *pMsg); int32_t mnodeInitMsg(SMnodeMsg *pMsg);
void mnodeCleanupMsg(SMnodeMsg *pMsg); void mnodeCleanupMsg(SMnodeMsg *pMsg);
...@@ -62,7 +63,7 @@ bool mnodeIsRunning(); ...@@ -62,7 +63,7 @@ bool mnodeIsRunning();
int32_t mnodeProcessRead(SMnodeMsg *pMsg); int32_t mnodeProcessRead(SMnodeMsg *pMsg);
int32_t mnodeProcessWrite(SMnodeMsg *pMsg); int32_t mnodeProcessWrite(SMnodeMsg *pMsg);
int32_t mnodeProcessPeerReq(SMnodeMsg *pMsg); int32_t mnodeProcessPeerReq(SMnodeMsg *pMsg);
void mnodeProcessPeerRsp(struct SRpcMsg *pMsg); void mnodeProcessPeerRsp(SRpcMsg *pMsg);
int32_t mnodeRetriveAuth(char *user, char *spi, char *encrypt, char *secret, char *ckey); int32_t mnodeRetriveAuth(char *user, char *spi, char *encrypt, char *secret, char *ckey);
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -28,7 +28,7 @@ extern int32_t sdbDebugFlag; ...@@ -28,7 +28,7 @@ extern int32_t sdbDebugFlag;
// mnode log function // mnode log function
#define mError(...) { if (mDebugFlag & DEBUG_ERROR) { taosPrintLog("ERROR MND ", 255, __VA_ARGS__); }} #define mError(...) { if (mDebugFlag & DEBUG_ERROR) { taosPrintLog("ERROR MND ", 255, __VA_ARGS__); }}
#define mWarn(...) { if (mDebugFlag & DEBUG_WARN) { taosPrintLog("WARN MND ", mDebugFlag, __VA_ARGS__); }} #define mWarn(...) { if (mDebugFlag & DEBUG_WARN) { taosPrintLog("WARN MND ", mDebugFlag, __VA_ARGS__); }}
#define mTrace(...) { if (mDebugFlag & DEBUG_TRACE) { taosPrintLog("MND ", mDebugFlag, __VA_ARGS__); }} #define mTrace(...) { if (mDebugFlag & DEBUG_TRACE) { taosPrintLog("MND ", mDebugFlag, __VA_ARGS__); }}
#define mPrint(...) { taosPrintLog("MND ", 255, __VA_ARGS__); } #define mPrint(...) { taosPrintLog("MND ", 255, __VA_ARGS__); }
...@@ -37,7 +37,7 @@ extern int32_t sdbDebugFlag; ...@@ -37,7 +37,7 @@ extern int32_t sdbDebugFlag;
#define mLPrint(...) { monitorSaveLog(0, __VA_ARGS__); mPrint(__VA_ARGS__) } #define mLPrint(...) { monitorSaveLog(0, __VA_ARGS__); mPrint(__VA_ARGS__) }
#define sdbError(...) { if (sdbDebugFlag & DEBUG_ERROR) { taosPrintLog("ERROR MND-SDB ", 255, __VA_ARGS__); }} #define sdbError(...) { if (sdbDebugFlag & DEBUG_ERROR) { taosPrintLog("ERROR MND-SDB ", 255, __VA_ARGS__); }}
#define sdbWarn(...) { if (sdbDebugFlag & DEBUG_WARN) { taosPrintLog("WARN MND-SDB ", sdbDebugFlag, __VA_ARGS__); }} #define sdbWarn(...) { if (sdbDebugFlag & DEBUG_WARN) { taosPrintLog("WARN MND-SDB ", sdbDebugFlag, __VA_ARGS__); }}
#define sdbTrace(...) { if (sdbDebugFlag & DEBUG_TRACE) { taosPrintLog("MND-SDB ", sdbDebugFlag, __VA_ARGS__);}} #define sdbTrace(...) { if (sdbDebugFlag & DEBUG_TRACE) { taosPrintLog("MND-SDB ", sdbDebugFlag, __VA_ARGS__);}}
#define sdbPrint(...) { taosPrintLog("MND-SDB ", 255, __VA_ARGS__); } #define sdbPrint(...) { taosPrintLog("MND-SDB ", 255, __VA_ARGS__); }
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include "os.h" #include "os.h"
#include "trpc.h"
#include "tgrant.h" #include "tgrant.h"
#include "tbalance.h" #include "tbalance.h"
#include "tglobal.h" #include "tglobal.h"
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include "os.h" #include "os.h"
#include "taoserror.h" #include "taoserror.h"
#include "trpc.h"
#include "tsched.h" #include "tsched.h"
#include "tsystem.h" #include "tsystem.h"
#include "tutil.h" #include "tutil.h"
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include "os.h" #include "os.h"
#include "trpc.h"
#include "taosdef.h" #include "taosdef.h"
#include "tsched.h" #include "tsched.h"
#include "tbalance.h" #include "tbalance.h"
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#include "os.h" #include "os.h"
#include "taoserror.h" #include "taoserror.h"
#include "hash.h" #include "hash.h"
#include "trpc.h"
#include "tutil.h" #include "tutil.h"
#include "tbalance.h" #include "tbalance.h"
#include "tqueue.h" #include "tqueue.h"
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#include "os.h" #include "os.h"
#include "taosmsg.h" #include "taosmsg.h"
#include "taoserror.h" #include "taoserror.h"
#include "trpc.h"
#include "tsched.h" #include "tsched.h"
#include "tutil.h" #include "tutil.h"
#include "ttimer.h" #include "ttimer.h"
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
extern int32_t httpDebugFlag; extern int32_t httpDebugFlag;
#define httpError(...) { if (httpDebugFlag & DEBUG_ERROR) { taosPrintLog("ERROR HTP ", 255, __VA_ARGS__); }} #define httpError(...) { if (httpDebugFlag & DEBUG_ERROR) { taosPrintLog("ERROR HTP ", 255, __VA_ARGS__); }}
#define httpWarn(...) { if (httpDebugFlag & DEBUG_WARN) { taosPrintLog("WARN HTP ", httpDebugFlag, __VA_ARGS__); }} #define httpWarn(...) { if (httpDebugFlag & DEBUG_WARN) { taosPrintLog("WARN HTP ", httpDebugFlag, __VA_ARGS__); }}
#define httpTrace(...) { if (httpDebugFlag & DEBUG_TRACE) { taosPrintLog("HTP ", httpDebugFlag, __VA_ARGS__); }} #define httpTrace(...) { if (httpDebugFlag & DEBUG_TRACE) { taosPrintLog("HTP ", httpDebugFlag, __VA_ARGS__); }}
#define httpDump(...) { if (httpDebugFlag & DEBUG_TRACE) { taosPrintLongString("HTP ", httpDebugFlag, __VA_ARGS__); }} #define httpDump(...) { if (httpDebugFlag & DEBUG_TRACE) { taosPrintLongString("HTP ", httpDebugFlag, __VA_ARGS__); }}
#define httpPrint(...) { taosPrintLog("HTP ", 255, __VA_ARGS__); } #define httpPrint(...) { taosPrintLog("HTP ", 255, __VA_ARGS__); }
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include "monitor.h" #include "monitor.h"
#define monitorError(...) { if (monitorDebugFlag & DEBUG_ERROR) { taosPrintLog("ERROR MON ", 255, __VA_ARGS__); }} #define monitorError(...) { if (monitorDebugFlag & DEBUG_ERROR) { taosPrintLog("ERROR MON ", 255, __VA_ARGS__); }}
#define monitorWarn(...) { if (monitorDebugFlag & DEBUG_WARN) { taosPrintLog("WARN MON ", monitorDebugFlag, __VA_ARGS__); }} #define monitorWarn(...) { if (monitorDebugFlag & DEBUG_WARN) { taosPrintLog("WARN MON ", monitorDebugFlag, __VA_ARGS__); }}
#define monitorTrace(...) { if (monitorDebugFlag & DEBUG_TRACE) { taosPrintLog("MON ", monitorDebugFlag, __VA_ARGS__); }} #define monitorTrace(...) { if (monitorDebugFlag & DEBUG_TRACE) { taosPrintLog("MON ", monitorDebugFlag, __VA_ARGS__); }}
#define monitorPrint(...) { taosPrintLog("MON ", 255, __VA_ARGS__); } #define monitorPrint(...) { taosPrintLog("MON ", 255, __VA_ARGS__); }
......
...@@ -26,7 +26,7 @@ extern int32_t mqttDebugFlag; ...@@ -26,7 +26,7 @@ extern int32_t mqttDebugFlag;
} }
#define mqttWarn(...) \ #define mqttWarn(...) \
if ( mqttDebugFlag & DEBUG_WARN) { \ if ( mqttDebugFlag & DEBUG_WARN) { \
taosPrintLog("WARN MQT ", mqttDebugFlag, __VA_ARGS__); \ taosPrintLog("WARN MQT ", mqttDebugFlag, __VA_ARGS__); \
} }
#define mqttTrace(...) \ #define mqttTrace(...) \
if ( mqttDebugFlag & DEBUG_TRACE) { \ if ( mqttDebugFlag & DEBUG_TRACE) { \
......
...@@ -25,7 +25,7 @@ extern "C" { ...@@ -25,7 +25,7 @@ extern "C" {
extern int32_t rpcDebugFlag; extern int32_t rpcDebugFlag;
#define tError(...) { if (rpcDebugFlag & DEBUG_ERROR) { taosPrintLog("ERROR RPC ", rpcDebugFlag, __VA_ARGS__); }} #define tError(...) { if (rpcDebugFlag & DEBUG_ERROR) { taosPrintLog("ERROR RPC ", rpcDebugFlag, __VA_ARGS__); }}
#define tWarn(...) { if (rpcDebugFlag & DEBUG_WARN) { taosPrintLog("WARN RPC ", rpcDebugFlag, __VA_ARGS__); }} #define tWarn(...) { if (rpcDebugFlag & DEBUG_WARN) { taosPrintLog("WARN RPC ", rpcDebugFlag, __VA_ARGS__); }}
#define tTrace(...) { if (rpcDebugFlag & DEBUG_TRACE) { taosPrintLog("RPC ", rpcDebugFlag, __VA_ARGS__); }} #define tTrace(...) { if (rpcDebugFlag & DEBUG_TRACE) { taosPrintLog("RPC ", rpcDebugFlag, __VA_ARGS__); }}
#define tDump(x, y) { if (rpcDebugFlag & DEBUG_DUMP) { taosDumpData((unsigned char *)x, y); }} #define tDump(x, y) { if (rpcDebugFlag & DEBUG_DUMP) { taosDumpData((unsigned char *)x, y); }}
#define tPrint(...) { taosPrintLog("RPC ", 255, __VA_ARGS__); } #define tPrint(...) { taosPrintLog("RPC ", 255, __VA_ARGS__); }
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#define tmrWarn(...) \ #define tmrWarn(...) \
do { if (tmrDebugFlag & DEBUG_WARN) { \ do { if (tmrDebugFlag & DEBUG_WARN) { \
taosPrintLog("WARN TMR ", tmrDebugFlag, __VA_ARGS__); \ taosPrintLog("WARN TMR ", tmrDebugFlag, __VA_ARGS__); \
} } while(0) } } while(0)
#define tmrTrace(...) \ #define tmrTrace(...) \
......
...@@ -27,10 +27,10 @@ extern "C" { ...@@ -27,10 +27,10 @@ extern "C" {
extern int32_t vDebugFlag; extern int32_t vDebugFlag;
#define vError(...) if (vDebugFlag & DEBUG_ERROR) {taosPrintLog("ERROR VND ", 255, __VA_ARGS__); } #define vError(...) { if (vDebugFlag & DEBUG_ERROR) { taosPrintLog("ERROR VND ", 255, __VA_ARGS__); }}
#define vWarn(...) if (vDebugFlag & DEBUG_WARN) {taosPrintLog("WARN VND ", vDebugFlag, __VA_ARGS__); } #define vWarn(...) { if (vDebugFlag & DEBUG_WARN) { taosPrintLog("WARN VND ", vDebugFlag, __VA_ARGS__); }}
#define vTrace(...) if (vDebugFlag & DEBUG_TRACE) {taosPrintLog("VND ", vDebugFlag, __VA_ARGS__); } #define vTrace(...) { if (vDebugFlag & DEBUG_TRACE) { taosPrintLog("VND ", vDebugFlag, __VA_ARGS__); }}
#define vPrint(...) {taosPrintLog("VND ", 255, __VA_ARGS__); } #define vPrint(...) { taosPrintLog("VND ", 255, __VA_ARGS__); }
typedef struct { typedef struct {
int32_t vgId; // global vnode group ID int32_t vgId; // global vnode group ID
......
...@@ -24,20 +24,10 @@ extern "C" { ...@@ -24,20 +24,10 @@ extern "C" {
extern int32_t dDebugFlag; extern int32_t dDebugFlag;
#define dError(...) \ #define dError(...) { if (dDebugFlag & DEBUG_ERROR) { taosPrintLog("ERROR DND ", 255, __VA_ARGS__); }}
if (dDebugFlag & DEBUG_ERROR) { \ #define dWarn(...) { if (dDebugFlag & DEBUG_WARN) { taosPrintLog("WARN DND ", dDebugFlag, __VA_ARGS__); }}
taosPrintLog("ERROR DND ", 255, __VA_ARGS__); \ #define dTrace(...) { if (dDebugFlag & DEBUG_TRACE) { taosPrintLog("DND ", dDebugFlag, __VA_ARGS__); }}
} #define dPrint(...) { taosPrintLog("DND ", 255, __VA_ARGS__); }
#define dWarn(...) \
if (dDebugFlag & DEBUG_WARN) { \
taosPrintLog("WARN DND ", dDebugFlag, __VA_ARGS__); \
}
#define dTrace(...) \
if (dDebugFlag & DEBUG_TRACE) { \
taosPrintLog("DND ", dDebugFlag, __VA_ARGS__); \
}
#define dPrint(...) \
{ taosPrintLog("DND ", 255, __VA_ARGS__); }
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -198,8 +198,8 @@ int32_t vnodeOpen(int32_t vnode, char *rootDir) { ...@@ -198,8 +198,8 @@ int32_t vnodeOpen(int32_t vnode, char *rootDir) {
pVnode->fversion = pVnode->version; pVnode->fversion = pVnode->version;
pVnode->wqueue = dnodeAllocateWqueue(pVnode); pVnode->wqueue = dnodeAllocateVnodeWqueue(pVnode);
pVnode->rqueue = dnodeAllocateRqueue(pVnode); pVnode->rqueue = dnodeAllocateVnodeRqueue(pVnode);
if (pVnode->wqueue == NULL || pVnode->rqueue == NULL) { if (pVnode->wqueue == NULL || pVnode->rqueue == NULL) {
vnodeCleanUp(pVnode); vnodeCleanUp(pVnode);
return terrno; return terrno;
...@@ -245,7 +245,7 @@ int32_t vnodeOpen(int32_t vnode, char *rootDir) { ...@@ -245,7 +245,7 @@ int32_t vnodeOpen(int32_t vnode, char *rootDir) {
syncInfo.getWalInfo = vnodeGetWalInfo; syncInfo.getWalInfo = vnodeGetWalInfo;
syncInfo.getFileInfo = vnodeGetFileInfo; syncInfo.getFileInfo = vnodeGetFileInfo;
syncInfo.writeToCache = vnodeWriteToQueue; syncInfo.writeToCache = vnodeWriteToQueue;
syncInfo.confirmForward = dnodeSendRpcWriteRsp; syncInfo.confirmForward = dnodeSendRpcVnodeWriteRsp;
syncInfo.notifyRole = vnodeNotifyRole; syncInfo.notifyRole = vnodeNotifyRole;
syncInfo.notifyFileSynced = vnodeNotifyFileSynced; syncInfo.notifyFileSynced = vnodeNotifyFileSynced;
pVnode->sync = syncStart(&syncInfo); pVnode->sync = syncStart(&syncInfo);
...@@ -404,11 +404,11 @@ static void vnodeCleanUp(SVnodeObj *pVnode) { ...@@ -404,11 +404,11 @@ static void vnodeCleanUp(SVnodeObj *pVnode) {
pVnode->cq = NULL; pVnode->cq = NULL;
if (pVnode->wqueue) if (pVnode->wqueue)
dnodeFreeWqueue(pVnode->wqueue); dnodeFreeVnodeWqueue(pVnode->wqueue);
pVnode->wqueue = NULL; pVnode->wqueue = NULL;
if (pVnode->rqueue) if (pVnode->rqueue)
dnodeFreeRqueue(pVnode->rqueue); dnodeFreeVnodeRqueue(pVnode->rqueue);
pVnode->rqueue = NULL; pVnode->rqueue = NULL;
vnodeRelease(pVnode); vnodeRelease(pVnode);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册