Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
38af2df4
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
38af2df4
编写于
11月 22, 2020
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
TD-2166
上级
212fe11d
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
16 addition
and
17 deletion
+16
-17
src/dnode/src/dnodeEps.c
src/dnode/src/dnodeEps.c
+1
-1
src/inc/tsync.h
src/inc/tsync.h
+1
-1
src/mnode/src/mnodeSdb.c
src/mnode/src/mnodeSdb.c
+1
-1
src/mnode/src/mnodeTable.c
src/mnode/src/mnodeTable.c
+1
-1
src/sync/inc/syncInt.h
src/sync/inc/syncInt.h
+5
-5
src/sync/src/syncMain.c
src/sync/src/syncMain.c
+2
-2
src/vnode/src/vnodeRead.c
src/vnode/src/vnodeRead.c
+1
-2
src/vnode/src/vnodeWrite.c
src/vnode/src/vnodeWrite.c
+4
-4
未找到文件。
src/dnode/src/dnodeEps.c
浏览文件 @
38af2df4
...
...
@@ -33,7 +33,7 @@ static void dnodePrintEps(SDnodeEps *eps);
int32_t
dnodeInitEps
()
{
pthread_mutex_init
(
&
tsEpsMutex
,
NULL
);
tsEpsHash
=
taosHashInit
(
4
,
taosGetDefaultHashFunction
(
TSDB_DATA_TYPE_INT
),
true
,
true
);
tsEpsHash
=
taosHashInit
(
4
,
taosGetDefaultHashFunction
(
TSDB_DATA_TYPE_INT
),
true
,
HASH_ENTRY_LOCK
);
dnodeResetEps
(
NULL
);
int32_t
ret
=
dnodeReadEps
();
if
(
ret
==
0
)
{
...
...
src/inc/tsync.h
浏览文件 @
38af2df4
...
...
@@ -89,7 +89,7 @@ typedef struct {
int32_t
vgId
;
// vgroup ID
uint64_t
version
;
// initial version
SSyncCfg
syncCfg
;
// configuration from mgmt
char
path
[
128
];
// path to the file
char
path
[
TSDB_FILENAME_LEN
];
// path to the file
FGetFileInfo
getFileInfo
;
FGetWalInfo
getWalInfo
;
FWriteToCache
writeToCache
;
...
...
src/mnode/src/mnodeSdb.c
浏览文件 @
38af2df4
...
...
@@ -812,7 +812,7 @@ void *sdbOpenTable(SSdbTableDesc *pDesc) {
if
(
pTable
->
keyType
==
SDB_KEY_STRING
||
pTable
->
keyType
==
SDB_KEY_VAR_STRING
)
{
hashFp
=
taosGetDefaultHashFunction
(
TSDB_DATA_TYPE_BINARY
);
}
pTable
->
iHandle
=
taosHashInit
(
pTable
->
hashSessions
,
hashFp
,
true
,
true
);
pTable
->
iHandle
=
taosHashInit
(
pTable
->
hashSessions
,
hashFp
,
true
,
HASH_ENTRY_LOCK
);
tsSdbMgmt
.
numOfTables
++
;
tsSdbMgmt
.
tableList
[
pTable
->
id
]
=
pTable
;
...
...
src/mnode/src/mnodeTable.c
浏览文件 @
38af2df4
...
...
@@ -394,7 +394,7 @@ static void mnodeAddTableIntoStable(SSTableObj *pStable, SCTableObj *pCtable) {
atomic_add_fetch_32
(
&
pStable
->
numOfTables
,
1
);
if
(
pStable
->
vgHash
==
NULL
)
{
pStable
->
vgHash
=
taosHashInit
(
64
,
taosGetDefaultHashFunction
(
TSDB_DATA_TYPE_INT
),
true
,
false
);
pStable
->
vgHash
=
taosHashInit
(
64
,
taosGetDefaultHashFunction
(
TSDB_DATA_TYPE_INT
),
true
,
HASH_NO_LOCK
);
}
if
(
pStable
->
vgHash
!=
NULL
)
{
...
...
src/sync/inc/syncInt.h
浏览文件 @
38af2df4
...
...
@@ -153,12 +153,12 @@ typedef struct SSyncNode {
int8_t
selfIndex
;
uint32_t
vgId
;
int64_t
rid
;
SSyncPeer
*
peerInfo
[
TAOS_SYNC_MAX_REPLICA
+
1
];
// extra one for arbitrator
SSyncPeer
*
pMaster
;
SSyncPeer
*
peerInfo
[
TAOS_SYNC_MAX_REPLICA
+
1
];
// extra one for arbitrator
SSyncPeer
*
pMaster
;
SRecvBuffer
*
pRecv
;
SSyncFwds
*
pSyncFwds
;
// saved forward info if quorum >1
void
*
pFwdTimer
;
void
*
pRoleTimer
;
SSyncFwds
*
pSyncFwds
;
// saved forward info if quorum >1
void
*
pFwdTimer
;
void
*
pRoleTimer
;
FGetFileInfo
getFileInfo
;
FGetWalInfo
getWalInfo
;
FWriteToCache
writeToCache
;
...
...
src/sync/src/syncMain.c
浏览文件 @
38af2df4
...
...
@@ -100,7 +100,7 @@ uint16_t syncGenTranId() {
}
int32_t
syncInit
()
{
SPoolInfo
info
;
SPoolInfo
info
=
{
0
}
;
info
.
numOfThreads
=
tsSyncTcpThreads
;
info
.
serverIp
=
0
;
...
...
@@ -124,7 +124,7 @@ int32_t syncInit() {
return
-
1
;
}
tsVgIdHash
=
taosHashInit
(
TSDB_MIN_VNODES
,
taosGetDefaultHashFunction
(
TSDB_DATA_TYPE_INT
),
true
,
true
);
tsVgIdHash
=
taosHashInit
(
TSDB_MIN_VNODES
,
taosGetDefaultHashFunction
(
TSDB_DATA_TYPE_INT
),
true
,
HASH_ENTRY_LOCK
);
if
(
tsVgIdHash
==
NULL
)
{
sError
(
"failed to init tsVgIdHash"
);
taosTmrCleanUp
(
tsSyncTmrCtrl
);
...
...
src/vnode/src/vnodeRead.c
浏览文件 @
38af2df4
...
...
@@ -53,8 +53,7 @@ int32_t vnodeProcessRead(void *vparam, SVReadMsg *pRead) {
return
(
*
vnodeProcessReadMsgFp
[
msgType
])(
pVnode
,
pRead
);
}
static
int32_t
vnodeCheckRead
(
void
*
vparam
)
{
SVnodeObj
*
pVnode
=
vparam
;
static
int32_t
vnodeCheckRead
(
SVnodeObj
*
pVnode
)
{
if
(
pVnode
->
status
!=
TAOS_VN_STATUS_READY
)
{
vDebug
(
"vgId:%d, vnode status is %s, refCount:%d pVnode:%p"
,
pVnode
->
vgId
,
vnodeStatus
[
pVnode
->
status
],
pVnode
->
refCount
,
pVnode
);
...
...
src/vnode/src/vnodeWrite.c
浏览文件 @
38af2df4
...
...
@@ -48,10 +48,10 @@ void vnodeInitWriteFp(void) {
}
int32_t
vnodeProcessWrite
(
void
*
vparam
,
void
*
wparam
,
int32_t
qtype
,
void
*
rparam
)
{
int32_t
code
=
0
;
SVnodeObj
*
pVnode
=
vparam
;
SWalHead
*
pHead
=
wparam
;
SRspRet
*
pRspRet
=
rparam
;
int32_t
code
=
0
;
SVnodeObj
*
pVnode
=
vparam
;
SWalHead
*
pHead
=
wparam
;
SRspRet
*
pRspRet
=
rparam
;
if
(
vnodeProcessWriteMsgFp
[
pHead
->
msgType
]
==
NULL
)
{
vError
(
"vgId:%d, msg:%s not processed since no handle, qtype:%s hver:%"
PRIu64
,
pVnode
->
vgId
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录