Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
7f1a4b9c
T
TDengine
项目概览
taosdata
/
TDengine
11 个月 前同步成功
通知
1179
Star
22014
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
7f1a4b9c
编写于
11月 19, 2021
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove global variables
上级
72ec9324
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
113 addition
and
54 deletion
+113
-54
include/dnode/mnode/mnode.h
include/dnode/mnode/mnode.h
+15
-7
include/dnode/mnode/sdb/sdb.h
include/dnode/mnode/sdb/sdb.h
+2
-0
include/dnode/vnode/vnode.h
include/dnode/vnode/vnode.h
+9
-3
source/dnode/mgmt/inc/dnodeDnode.h
source/dnode/mgmt/inc/dnodeDnode.h
+1
-1
source/dnode/mgmt/inc/dnodeInt.h
source/dnode/mgmt/inc/dnodeInt.h
+3
-0
source/dnode/mgmt/inc/dnodeTransport.h
source/dnode/mgmt/inc/dnodeTransport.h
+2
-2
source/dnode/mgmt/src/dnodeDnode.c
source/dnode/mgmt/src/dnodeDnode.c
+2
-2
source/dnode/mgmt/src/dnodeMnode.c
source/dnode/mgmt/src/dnodeMnode.c
+11
-6
source/dnode/mgmt/src/dnodeTransport.c
source/dnode/mgmt/src/dnodeTransport.c
+3
-3
source/dnode/mgmt/src/dnodeVnodes.c
source/dnode/mgmt/src/dnodeVnodes.c
+4
-4
source/dnode/mnode/impl/inc/mnodeInt.h
source/dnode/mnode/impl/inc/mnodeInt.h
+20
-3
source/dnode/mnode/impl/src/mnode.c
source/dnode/mnode/impl/src/mnode.c
+37
-19
source/dnode/mnode/sdb/inc/sdbInt.h
source/dnode/mnode/sdb/inc/sdbInt.h
+3
-3
source/dnode/mnode/sdb/src/sdb.c
source/dnode/mnode/sdb/src/sdb.c
+1
-1
未找到文件。
include/dnode/mnode/mnode.h
浏览文件 @
7f1a4b9c
...
...
@@ -43,16 +43,24 @@ typedef struct {
int64_t
compStorage
;
}
SMnodeLoad
;
typedef
struct
SMnode
SMnode
;
typedef
struct
SServer
SServer
;
typedef
void
(
*
SendMsgToDnodeFp
)(
SServer
*
pServer
,
struct
SEpSet
*
epSet
,
struct
SRpcMsg
*
rpcMsg
);
typedef
void
(
*
SendMsgToMnodeFp
)(
SServer
*
pServer
,
struct
SRpcMsg
*
rpcMsg
);
typedef
void
(
*
SendRedirectMsgFp
)(
SServer
*
pServer
,
struct
SRpcMsg
*
rpcMsg
,
bool
forShell
);
typedef
int32_t
(
*
PutMsgToMnodeQFp
)(
SServer
*
pServer
,
SMnodeMsg
*
pMsg
);
typedef
struct
{
int32_t
dnodeId
;
int64_t
clusterId
;
void
(
*
SendMsgToDnode
)(
struct
SEpSet
*
epSet
,
struct
SRpcMsg
*
rpcMsg
)
;
void
(
*
SendMsgToMnode
)(
struct
SRpcMsg
*
rpcMsg
)
;
void
(
*
SendRedirectMsg
)(
struct
SRpcMsg
*
rpcMsg
,
bool
forShell
)
;
int32_t
(
*
PutMsgIntoApplyQueue
)(
SMnodeMsg
*
pMsg
)
;
int32_t
dnodeId
;
int64_t
clusterId
;
PutMsgToMnodeQFp
putMsgToApplyMsgFp
;
SendMsgToDnodeFp
sendMsgToDnodeFp
;
SendMsgToMnodeFp
sendMsgToMnodeFp
;
SendRedirectMsgFp
sendRedirectMsgFp
;
}
SMnodePara
;
int32_t
mnodeInit
(
SMnodePara
para
);
SMnode
*
mnodeCreate
(
SMnodePara
para
);
void
mnodeCleanup
();
int32_t
mnodeDeploy
(
SMnodeCfg
*
pCfg
);
...
...
include/dnode/mnode/sdb/sdb.h
浏览文件 @
7f1a4b9c
...
...
@@ -144,6 +144,8 @@ typedef struct {
SdbDeleteFp
deleteFp
;
}
SSdbTable
;
typedef
struct
SSdb
SSdb
;
int32_t
sdbInit
();
void
sdbCleanup
();
void
sdbSetTable
(
SSdbTable
table
);
...
...
include/dnode/vnode/vnode.h
浏览文件 @
7f1a4b9c
...
...
@@ -184,10 +184,16 @@ typedef struct {
SRpcMsg
rpcMsg
[];
}
SVnodeMsg
;
typedef
struct
SServer
SServer
;
typedef
void
(
*
SendMsgToDnodeFp
)(
SServer
*
pServer
,
struct
SEpSet
*
epSet
,
struct
SRpcMsg
*
rpcMsg
);
typedef
void
(
*
SendMsgToMnodeFp
)(
SServer
*
pServer
,
struct
SRpcMsg
*
rpcMsg
);
typedef
void
(
*
SendRedirectMsgFp
)(
SServer
*
pServer
,
struct
SRpcMsg
*
rpcMsg
,
bool
forShell
);
typedef
int32_t
(
*
PutMsgToVnodeQFp
)(
SServer
*
pServer
,
int32_t
vgId
,
SVnodeMsg
*
pMsg
);
typedef
struct
{
void
(
*
SendMsgToDnode
)(
SEpSet
*
pEpSet
,
SRpcMsg
*
pMsg
)
;
void
(
*
SendMsgToMnode
)(
SRpcMsg
*
pMsg
)
;
int32_t
(
*
PutMsgIntoApplyQueue
)(
int32_t
vgId
,
SVnodeMsg
*
pMsg
)
;
PutMsgToVnodeQFp
putMsgToApplyQueueFp
;
SendMsgToDnodeFp
sendMsgToDnodeFp
;
SendMsgToMnodeFp
sendMsgToMnodeFp
;
}
SVnodePara
;
int32_t
vnodeInit
(
SVnodePara
);
...
...
source/dnode/mgmt/inc/dnodeDnode.h
浏览文件 @
7f1a4b9c
...
...
@@ -30,7 +30,7 @@ int64_t dnodeGetClusterId();
void
dnodeGetDnodeEp
(
int32_t
dnodeId
,
char
*
epstr
,
char
*
fqdn
,
uint16_t
*
port
);
void
dnodeGetMnodeEpSetForPeer
(
SEpSet
*
epSet
);
void
dnodeGetMnodeEpSetForShell
(
SEpSet
*
epSet
);
void
dnodeSendRedirectMsg
(
SRpcMsg
*
rpcMsg
,
bool
forShell
);
void
dnodeSendRedirectMsg
(
S
Server
*
pServer
,
S
RpcMsg
*
rpcMsg
,
bool
forShell
);
#ifdef __cplusplus
}
...
...
source/dnode/mgmt/inc/dnodeInt.h
浏览文件 @
7f1a4b9c
...
...
@@ -37,6 +37,9 @@ extern int32_t dDebugFlag;
typedef
enum
{
DN_RUN_STAT_INIT
,
DN_RUN_STAT_RUNNING
,
DN_RUN_STAT_STOPPED
}
EDnStat
;
typedef
void
(
*
MsgFp
)(
SRpcMsg
*
pMsg
,
SEpSet
*
pEpSet
);
typedef
struct
SServer
{
}
SServer
;
int32_t
dnodeInit
();
void
dnodeCleanup
();
...
...
source/dnode/mgmt/inc/dnodeTransport.h
浏览文件 @
7f1a4b9c
...
...
@@ -23,8 +23,8 @@ extern "C" {
int32_t
dnodeInitTrans
();
void
dnodeCleanupTrans
();
void
dnodeSendMsgToMnode
(
SRpcMsg
*
rpcMsg
);
void
dnodeSendMsgToDnode
(
SEpSet
*
epSet
,
SRpcMsg
*
rpcMsg
);
void
dnodeSendMsgToMnode
(
S
Server
*
pServer
,
S
RpcMsg
*
rpcMsg
);
void
dnodeSendMsgToDnode
(
S
Server
*
pServer
,
S
EpSet
*
epSet
,
SRpcMsg
*
rpcMsg
);
#ifdef __cplusplus
}
...
...
source/dnode/mgmt/src/dnodeDnode.c
浏览文件 @
7f1a4b9c
...
...
@@ -78,7 +78,7 @@ void dnodeGetMnodeEpSetForShell(SEpSet *pEpSet) {
pthread_mutex_unlock
(
&
tsDnode
.
mutex
);
}
void
dnodeSendRedirectMsg
(
SRpcMsg
*
pMsg
,
bool
forShell
)
{
void
dnodeSendRedirectMsg
(
S
Server
*
pServer
,
S
RpcMsg
*
pMsg
,
bool
forShell
)
{
int32_t
msgType
=
pMsg
->
msgType
;
SEpSet
epSet
=
{
0
};
...
...
@@ -383,7 +383,7 @@ static void dnodeSendStatusMsg() {
contLen
=
sizeof
(
SStatusMsg
)
+
pStatus
->
vnodeLoads
.
num
*
sizeof
(
SVnodeLoad
);
SRpcMsg
rpcMsg
=
{.
pCont
=
pStatus
,
.
contLen
=
contLen
,
.
msgType
=
TSDB_MSG_TYPE_STATUS
};
dnodeSendMsgToMnode
(
&
rpcMsg
);
dnodeSendMsgToMnode
(
NULL
,
&
rpcMsg
);
}
static
void
dnodeUpdateCfg
(
SDnodeCfg
*
pCfg
)
{
...
...
source/dnode/mgmt/src/dnodeMnode.c
浏览文件 @
7f1a4b9c
...
...
@@ -38,6 +38,7 @@ static struct {
taos_queue
pSyncQ
;
taos_queue
pMgmtQ
;
SSteps
*
pSteps
;
SMnode
*
pMnode
;
SRWLatch
latch
;
}
tsMnode
=
{
0
};
...
...
@@ -360,7 +361,7 @@ void dnodeProcessMnodeWriteMsg(SRpcMsg *pMsg, SEpSet *pEpSet) {
dnodeWriteMnodeMsgToQueue
(
tsMnode
.
pWriteQ
,
pMsg
);
dnodeReleaseMnode
();
}
else
{
dnodeSendRedirectMsg
(
pMsg
,
0
);
dnodeSendRedirectMsg
(
NULL
,
pMsg
,
0
);
}
}
...
...
@@ -381,7 +382,7 @@ void dnodeProcessMnodeReadMsg(SRpcMsg *pMsg, SEpSet *pEpSet) {
dnodeWriteMnodeMsgToQueue
(
tsMnode
.
pReadQ
,
pMsg
);
dnodeReleaseMnode
();
}
else
{
dnodeSendRedirectMsg
(
pMsg
,
0
);
dnodeSendRedirectMsg
(
NULL
,
pMsg
,
0
);
}
}
...
...
@@ -505,11 +506,15 @@ static int32_t dnodeInitMnodeModule() {
SMnodePara
para
;
para
.
dnodeId
=
dnodeGetDnodeId
();
para
.
clusterId
=
dnodeGetClusterId
();
para
.
SendMsgToDnode
=
dnodeSendMsgToDnode
;
para
.
SendMsgToMnode
=
dnodeSendMsgToMnode
;
para
.
SendRedirectMsg
=
dnodeSendRedirectMsg
;
para
.
sendMsgToDnodeFp
=
dnodeSendMsgToDnode
;
para
.
sendMsgToMnodeFp
=
dnodeSendMsgToMnode
;
para
.
sendMsgToMnodeFp
=
dnodeSendRedirectMsg
;
return
mnodeInit
(
para
);
tsMnode
.
pMnode
=
mnodeCreate
(
para
);
if
(
tsMnode
.
pMnode
!=
NULL
)
{
return
-
1
;
}
return
0
;
}
static
void
dnodeCleanupMnodeModule
()
{
mnodeCleanup
();
}
...
...
source/dnode/mgmt/src/dnodeTransport.c
浏览文件 @
7f1a4b9c
...
...
@@ -382,14 +382,14 @@ void dnodeCleanupTrans() {
dnodeCleanupClient
();
}
void
dnodeSendMsgToDnode
(
SEpSet
*
epSet
,
SRpcMsg
*
rpcMsg
)
{
void
dnodeSendMsgToDnode
(
S
Server
*
pServer
,
S
EpSet
*
epSet
,
SRpcMsg
*
rpcMsg
)
{
#if 0
rpcSendRequest(tsTrans.clientRpc, epSet, rpcMsg, NULL);
#endif
}
void
dnodeSendMsgToMnode
(
SRpcMsg
*
rpcMsg
)
{
void
dnodeSendMsgToMnode
(
S
Server
*
pServer
,
S
RpcMsg
*
rpcMsg
)
{
SEpSet
epSet
=
{
0
};
dnodeGetMnodeEpSetForPeer
(
&
epSet
);
dnodeSendMsgToDnode
(
&
epSet
,
rpcMsg
);
dnodeSendMsgToDnode
(
NULL
,
&
epSet
,
rpcMsg
);
}
\ No newline at end of file
source/dnode/mgmt/src/dnodeVnodes.c
浏览文件 @
7f1a4b9c
...
...
@@ -815,7 +815,7 @@ void dnodeProcessVnodeFetchMsg(SRpcMsg *pMsg, SEpSet *pEpSet) {
}
}
static
int32_t
dnodePutMsgIntoVnodeApplyQueue
(
int32_t
vgId
,
SVnodeMsg
*
pMsg
)
{
static
int32_t
dnodePutMsgIntoVnodeApplyQueue
(
SServer
*
pServer
,
int32_t
vgId
,
SVnodeMsg
*
pMsg
)
{
SVnodeObj
*
pVnode
=
dnodeAcquireVnode
(
vgId
);
if
(
pVnode
==
NULL
)
{
return
terrno
;
...
...
@@ -973,9 +973,9 @@ static void dnodeCleanupVnodeSyncWorker() { tMWorkerCleanup(&tsVnodes.syncPool);
static
int32_t
dnodeInitVnodeModule
()
{
SVnodePara
para
;
para
.
SendMsgToDnode
=
dnodeSendMsgToDnode
;
para
.
SendMsgToMnode
=
dnodeSendMsgToMnode
;
para
.
PutMsgIntoApplyQueue
=
dnodePutMsgIntoVnodeApplyQueue
;
para
.
sendMsgToDnodeFp
=
dnodeSendMsgToDnode
;
para
.
sendMsgToMnodeFp
=
dnodeSendMsgToMnode
;
para
.
putMsgToApplyQueueFp
=
dnodePutMsgIntoVnodeApplyQueue
;
return
vnodeInit
(
para
);
}
...
...
source/dnode/mnode/impl/inc/mnodeInt.h
浏览文件 @
7f1a4b9c
...
...
@@ -26,6 +26,16 @@ extern "C" {
typedef
int32_t
(
*
MnodeRpcFp
)(
SMnodeMsg
*
pMsg
);
typedef
struct
SMnodeBak
{
int32_t
dnodeId
;
int64_t
clusterId
;
tmr_h
timer
;
SSteps
*
pInitSteps
;
SSteps
*
pStartSteps
;
SMnodePara
para
;
MnodeRpcFp
msgFp
[
TSDB_MSG_TYPE_MAX
];
}
SMnodeBak
;
typedef
struct
SMnode
{
int32_t
dnodeId
;
int64_t
clusterId
;
...
...
@@ -34,15 +44,22 @@ typedef struct SMnode {
SSteps
*
pStartSteps
;
SMnodePara
para
;
MnodeRpcFp
msgFp
[
TSDB_MSG_TYPE_MAX
];
struct
SSdb
*
pSdb
;
struct
SServer
*
pServer
;
PutMsgToMnodeQFp
putMsgToApplyMsgFp
;
SendMsgToDnodeFp
sendMsgToDnodeFp
;
SendMsgToMnodeFp
sendMsgToMnodeFp
;
SendRedirectMsgFp
sendRedirectMsgFp
;
}
SMnode
;
tmr_h
mnodeGetTimer
();
int32_t
mnodeGetDnodeId
();
int64_t
mnodeGetClusterId
();
void
mnodeSendMsgToDnode
(
struct
SEpSet
*
epSet
,
struct
SRpcMsg
*
rpcMsg
);
void
mnodeSendMsgToMnode
(
struct
SRpcMsg
*
rpcMsg
);
void
mnodeSendRedirectMsg
(
struct
SRpcMsg
*
rpcMsg
,
bool
forShell
);
void
mnodeSendMsgToDnode
(
SMnode
*
pMnode
,
struct
SEpSet
*
epSet
,
struct
SRpcMsg
*
rpcMsg
);
void
mnodeSendMsgToMnode
(
SMnode
*
pMnode
,
struct
SRpcMsg
*
rpcMsg
);
void
mnodeSendRedirectMsg
(
SMnode
*
pMnode
,
struct
SRpcMsg
*
rpcMsg
,
bool
forShell
);
void
mnodeSetMsgFp
(
int32_t
msgType
,
MnodeRpcFp
fp
);
...
...
source/dnode/mnode/impl/src/mnode.c
浏览文件 @
7f1a4b9c
...
...
@@ -35,17 +35,26 @@
#include "mnodeVgroup.h"
#include "mnodeTrans.h"
SMnode
tsMint
=
{
0
};
SMnode
Bak
tsMint
=
{
0
};
int32_t
mnodeGetDnodeId
()
{
return
tsMint
.
para
.
dnodeId
;
}
int64_t
mnodeGetClusterId
()
{
return
tsMint
.
para
.
clusterId
;
}
void
mnodeSendMsgToDnode
(
struct
SEpSet
*
epSet
,
struct
SRpcMsg
*
rpcMsg
)
{
(
*
tsMint
.
para
.
SendMsgToDnode
)(
epSet
,
rpcMsg
);
}
void
mnodeSendMsgToDnode
(
SMnode
*
pMnode
,
struct
SEpSet
*
epSet
,
struct
SRpcMsg
*
rpcMsg
)
{
assert
(
pMnode
);
(
*
pMnode
->
sendMsgToDnodeFp
)(
pMnode
->
pServer
,
epSet
,
rpcMsg
);
}
void
mnodeSendMsgToMnode
(
struct
SRpcMsg
*
rpcMsg
)
{
return
(
*
tsMint
.
para
.
SendMsgToMnode
)(
rpcMsg
);
}
void
mnodeSendMsgToMnode
(
SMnode
*
pMnode
,
struct
SRpcMsg
*
rpcMsg
)
{
assert
(
pMnode
);
(
*
pMnode
->
sendMsgToMnodeFp
)(
pMnode
->
pServer
,
rpcMsg
);
}
void
mnodeSendRedirectMsg
(
struct
SRpcMsg
*
rpcMsg
,
bool
forShell
)
{
(
*
tsMint
.
para
.
SendRedirectMsg
)(
rpcMsg
,
forShell
);
}
void
mnodeSendRedirectMsg
(
SMnode
*
pMnode
,
struct
SRpcMsg
*
rpcMsg
,
bool
forShell
)
{
assert
(
pMnode
);
(
*
pMnode
->
sendRedirectMsgFp
)(
pMnode
->
pServer
,
rpcMsg
,
forShell
);
}
static
int32_t
mnodeInitTimer
()
{
if
(
tsMint
.
timer
==
NULL
)
{
...
...
@@ -68,35 +77,40 @@ static void mnodeCleanupTimer() {
tmr_h
mnodeGetTimer
()
{
return
tsMint
.
timer
;
}
static
int32_t
mnodeSetPara
(
SMnodePara
para
)
{
tsMint
.
para
=
para
;
static
int32_t
mnodeSetPara
(
SMnode
*
pMnode
,
SMnodePara
para
)
{
pMnode
->
dnodeId
=
para
.
dnodeId
;
pMnode
->
clusterId
=
para
.
clusterId
;
pMnode
->
putMsgToApplyMsgFp
=
para
.
putMsgToApplyMsgFp
;
pMnode
->
sendMsgToDnodeFp
=
para
.
sendMsgToDnodeFp
;
pMnode
->
sendMsgToMnodeFp
=
para
.
sendMsgToMnodeFp
;
pMnode
->
sendRedirectMsgFp
=
para
.
sendRedirectMsgFp
;
if
(
tsMint
.
para
.
SendMsgToDnode
==
NULL
)
{
if
(
pMnode
->
sendMsgToDnodeFp
==
NULL
)
{
terrno
=
TSDB_CODE_MND_APP_ERROR
;
return
-
1
;
}
if
(
tsMint
.
para
.
SendMsgToMnode
==
NULL
)
{
if
(
pMnode
->
sendMsgToMnodeFp
==
NULL
)
{
terrno
=
TSDB_CODE_MND_APP_ERROR
;
return
-
1
;
}
if
(
tsMint
.
para
.
SendRedirectMsg
==
NULL
)
{
if
(
pMnode
->
sendRedirectMsgFp
==
NULL
)
{
terrno
=
TSDB_CODE_MND_APP_ERROR
;
return
-
1
;
}
if
(
tsMint
.
para
.
PutMsgIntoApplyQueue
==
NULL
)
{
if
(
pMnode
->
putMsgToApplyMsgFp
==
NULL
)
{
terrno
=
TSDB_CODE_MND_APP_ERROR
;
return
-
1
;
}
if
(
tsMint
.
para
.
dnodeId
<
0
)
{
if
(
pMnode
->
dnodeId
<
0
)
{
terrno
=
TSDB_CODE_MND_APP_ERROR
;
return
-
1
;
}
if
(
tsMint
.
para
.
clusterId
<
0
)
{
if
(
pMnode
->
clusterId
<
0
)
{
terrno
=
TSDB_CODE_MND_APP_ERROR
;
return
-
1
;
}
...
...
@@ -142,23 +156,27 @@ static int32_t mnodeAllocStartSteps() {
return
0
;
}
int32_t
mnodeInit
(
SMnodePara
para
)
{
if
(
mnodeSetPara
(
para
)
!=
0
)
{
SMnode
*
mnodeCreate
(
SMnodePara
para
)
{
SMnode
*
pMnode
=
calloc
(
1
,
sizeof
(
SMnode
));
if
(
mnodeSetPara
(
pMnode
,
para
)
!=
0
)
{
free
(
pMnode
);
mError
(
"failed to init mnode para since %s"
,
terrstr
());
return
-
1
;
return
NULL
;
}
if
(
mnodeAllocInitSteps
()
!=
0
)
{
mError
(
"failed to alloc init steps since %s"
,
terrstr
());
return
-
1
;
return
NULL
;
}
if
(
mnodeAllocStartSteps
()
!=
0
)
{
mError
(
"failed to alloc start steps since %s"
,
terrstr
());
return
-
1
;
return
NULL
;
}
return
taosStepExec
(
tsMint
.
pInitSteps
);
taosStepExec
(
tsMint
.
pInitSteps
);
return
NULL
;
}
void
mnodeCleanup
()
{
taosStepCleanup
(
tsMint
.
pInitSteps
);
}
...
...
@@ -234,7 +252,7 @@ void mnodeSetMsgFp(int32_t msgType, MnodeRpcFp fp) {
void
mnodeProcessMsg
(
SMnodeMsg
*
pMsg
,
EMnMsgType
msgType
)
{
if
(
!
mnodeIsMaster
())
{
mnodeSendRedirectMsg
(
&
pMsg
->
rpcMsg
,
true
);
mnodeSendRedirectMsg
(
NULL
,
&
pMsg
->
rpcMsg
,
true
);
mnodeCleanupMsg
(
pMsg
);
return
;
}
...
...
source/dnode/mnode/sdb/inc/sdbInt.h
浏览文件 @
7f1a4b9c
...
...
@@ -52,7 +52,7 @@ typedef struct SSdbRow {
char
pObj
[];
}
SSdbRow
;
typedef
struct
{
typedef
struct
SSdb
{
char
*
currDir
;
char
*
syncDir
;
char
*
tmpDir
;
...
...
@@ -67,9 +67,9 @@ typedef struct {
SdbDeployFp
deployFps
[
SDB_MAX
];
SdbEncodeFp
encodeFps
[
SDB_MAX
];
SdbDecodeFp
decodeFps
[
SDB_MAX
];
}
SSdb
Mgr
;
}
SSdb
;
extern
SSdb
Mgr
tsSdb
;
extern
SSdb
tsSdb
;
int32_t
sdbWriteImp
(
SSdbRaw
*
pRaw
);
...
...
source/dnode/mnode/sdb/src/sdb.c
浏览文件 @
7f1a4b9c
...
...
@@ -17,7 +17,7 @@
#include "sdbInt.h"
#include "tglobal.h"
SSdb
Mgr
tsSdb
=
{
0
};
SSdb
tsSdb
=
{
0
};
int32_t
sdbInit
()
{
char
path
[
PATH_MAX
+
100
];
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录