Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
冷面1992
TDengine
提交
16132ff9
TDengine
项目概览
冷面1992
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
16132ff9
编写于
11月 05, 2020
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
TD-1918
上级
a0880e0d
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
10 addition
and
26 deletion
+10
-26
src/inc/vnode.h
src/inc/vnode.h
+0
-2
src/mnode/src/mnodeSdb.c
src/mnode/src/mnodeSdb.c
+7
-7
src/vnode/src/vnodeMain.c
src/vnode/src/vnodeMain.c
+0
-15
src/vnode/src/vnodeWrite.c
src/vnode/src/vnodeWrite.c
+3
-2
未找到文件。
src/inc/vnode.h
浏览文件 @
16132ff9
...
@@ -63,11 +63,9 @@ int32_t vnodeClose(int32_t vgId);
...
@@ -63,11 +63,9 @@ int32_t vnodeClose(int32_t vgId);
void
*
vnodeAcquire
(
int32_t
vgId
);
// add refcount
void
*
vnodeAcquire
(
int32_t
vgId
);
// add refcount
void
*
vnodeAcquireRqueue
(
int32_t
vgId
);
// add refCount, get read queue
void
*
vnodeAcquireRqueue
(
int32_t
vgId
);
// add refCount, get read queue
void
*
vnodeAcquireWqueue
(
int32_t
vgId
);
// add recCount, get write queue
void
vnodeRelease
(
void
*
pVnode
);
// dec refCount
void
vnodeRelease
(
void
*
pVnode
);
// dec refCount
void
*
vnodeGetWal
(
void
*
pVnode
);
void
*
vnodeGetWal
(
void
*
pVnode
);
int32_t
vnodeWriteToQueue
(
void
*
vparam
,
void
*
wparam
,
int32_t
qtype
,
void
*
pMsg
);
int32_t
vnodeWriteToQueue
(
void
*
vparam
,
void
*
wparam
,
int32_t
qtype
,
void
*
pMsg
);
int32_t
vnodeProcessWrite
(
void
*
param
,
int32_t
qtype
,
SVWriteMsg
*
pWrite
);
int32_t
vnodeProcessWrite
(
void
*
param
,
int32_t
qtype
,
SVWriteMsg
*
pWrite
);
int32_t
vnodeCheckWrite
(
void
*
pVnode
);
int32_t
vnodeCheckWrite
(
void
*
pVnode
);
...
...
src/mnode/src/mnodeSdb.c
浏览文件 @
16132ff9
...
@@ -98,8 +98,8 @@ static taos_qall tsSdbWriteQall;
...
@@ -98,8 +98,8 @@ static taos_qall tsSdbWriteQall;
static
taos_queue
tsSdbWriteQueue
;
static
taos_queue
tsSdbWriteQueue
;
static
SSdbWriteWorkerPool
tsSdbPool
;
static
SSdbWriteWorkerPool
tsSdbPool
;
static
int
sdbWrite
(
void
*
param
,
void
*
data
,
int
type
);
static
int
32_t
sdbWrite
(
void
*
param
,
void
*
data
,
int32_t
type
,
void
*
pMsg
);
static
int
sdbWriteToQueue
(
void
*
param
,
void
*
data
,
int
type
);
static
int
32_t
sdbWriteToQueue
(
void
*
param
,
void
*
data
,
int32_t
type
,
void
*
pMsg
);
static
void
*
sdbWorkerFp
(
void
*
param
);
static
void
*
sdbWorkerFp
(
void
*
param
);
static
int32_t
sdbInitWriteWorker
();
static
int32_t
sdbInitWriteWorker
();
static
void
sdbCleanupWriteWorker
();
static
void
sdbCleanupWriteWorker
();
...
@@ -575,7 +575,7 @@ static int32_t sdbUpdateHash(SSdbTable *pTable, SSdbOper *pOper) {
...
@@ -575,7 +575,7 @@ static int32_t sdbUpdateHash(SSdbTable *pTable, SSdbOper *pOper) {
return
TSDB_CODE_SUCCESS
;
return
TSDB_CODE_SUCCESS
;
}
}
static
int
sdbWrite
(
void
*
param
,
void
*
data
,
int
type
)
{
static
int
sdbWrite
(
void
*
param
,
void
*
data
,
int
32_t
type
,
void
*
pMsg
)
{
SSdbOper
*
pOper
=
param
;
SSdbOper
*
pOper
=
param
;
SWalHead
*
pHead
=
data
;
SWalHead
*
pHead
=
data
;
int32_t
tableId
=
pHead
->
msgType
/
10
;
int32_t
tableId
=
pHead
->
msgType
/
10
;
...
@@ -1040,13 +1040,13 @@ void sdbFreeWritequeue() {
...
@@ -1040,13 +1040,13 @@ void sdbFreeWritequeue() {
tsSdbWriteQueue
=
NULL
;
tsSdbWriteQueue
=
NULL
;
}
}
int
sdbWriteToQueue
(
void
*
param
,
void
*
data
,
int
type
)
{
int
32_t
sdbWriteToQueue
(
void
*
param
,
void
*
data
,
int32_t
qtype
,
void
*
pMsg
)
{
SWalHead
*
pHead
=
data
;
SWalHead
*
pHead
=
data
;
int
size
=
sizeof
(
SWalHead
)
+
pHead
->
len
;
int
32_t
size
=
sizeof
(
SWalHead
)
+
pHead
->
len
;
SWalHead
*
pWal
=
(
SWalHead
*
)
taosAllocateQitem
(
size
);
SWalHead
*
pWal
=
(
SWalHead
*
)
taosAllocateQitem
(
size
);
memcpy
(
pWal
,
pHead
,
size
);
memcpy
(
pWal
,
pHead
,
size
);
taosWriteQitem
(
tsSdbWriteQueue
,
type
,
pWal
);
taosWriteQitem
(
tsSdbWriteQueue
,
q
type
,
pWal
);
return
0
;
return
0
;
}
}
...
@@ -1081,7 +1081,7 @@ static void *sdbWorkerFp(void *param) {
...
@@ -1081,7 +1081,7 @@ static void *sdbWorkerFp(void *param) {
pOper
=
NULL
;
pOper
=
NULL
;
}
}
int32_t
code
=
sdbWrite
(
pOper
,
pHead
,
type
);
int32_t
code
=
sdbWrite
(
pOper
,
pHead
,
type
,
NULL
);
if
(
code
>
0
)
code
=
0
;
if
(
code
>
0
)
code
=
0
;
if
(
pOper
)
{
if
(
pOper
)
{
pOper
->
retCode
=
code
;
pOper
->
retCode
=
code
;
...
...
src/vnode/src/vnodeMain.c
浏览文件 @
16132ff9
...
@@ -483,21 +483,6 @@ void *vnodeAcquireRqueue(int32_t vgId) {
...
@@ -483,21 +483,6 @@ void *vnodeAcquireRqueue(int32_t vgId) {
return
pVnode
->
rqueue
;
return
pVnode
->
rqueue
;
}
}
void
*
vnodeAcquireWqueue
(
int32_t
vgId
)
{
SVnodeObj
*
pVnode
=
vnodeAcquire
(
vgId
);
if
(
pVnode
==
NULL
)
return
NULL
;
int32_t
code
=
vnodeCheckWrite
(
pVnode
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
terrno
=
code
;
vInfo
(
"vgId:%d, can not provide write service, status is %s"
,
vgId
,
vnodeStatus
[
pVnode
->
status
]);
vnodeRelease
(
pVnode
);
return
NULL
;
}
return
pVnode
->
wqueue
;
}
void
*
vnodeGetWal
(
void
*
pVnode
)
{
void
*
vnodeGetWal
(
void
*
pVnode
)
{
return
((
SVnodeObj
*
)
pVnode
)
->
wal
;
return
((
SVnodeObj
*
)
pVnode
)
->
wal
;
}
}
...
...
src/vnode/src/vnodeWrite.c
浏览文件 @
16132ff9
...
@@ -208,8 +208,9 @@ int32_t vnodeWriteToQueue(void *vparam, void *wparam, int32_t qtype, void *pMsg)
...
@@ -208,8 +208,9 @@ int32_t vnodeWriteToQueue(void *vparam, void *wparam, int32_t qtype, void *pMsg)
SVnodeObj
*
pVnode
=
vparam
;
SVnodeObj
*
pVnode
=
vparam
;
SWalHead
*
pHead
=
wparam
;
SWalHead
*
pHead
=
wparam
;
if
(
qtype
==
TAOS_QTYPE_RPC
&&
vnodeCheckWrite
(
pVnode
)
!=
TSDB_CODE_SUCCESS
)
{
if
(
qtype
==
TAOS_QTYPE_RPC
)
{
return
TSDB_CODE_VND_INVALID_VGROUP_ID
;
int32_t
code
=
vnodeCheckWrite
(
pVnode
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
return
code
;
}
}
int32_t
size
=
sizeof
(
SVWriteMsg
)
+
sizeof
(
SWalHead
)
+
pHead
->
len
;
int32_t
size
=
sizeof
(
SVWriteMsg
)
+
sizeof
(
SWalHead
)
+
pHead
->
len
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录