Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
555c1507
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
555c1507
编写于
3月 10, 2020
作者:
H
hzcheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
more
上级
0ed08405
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
15 addition
and
134 deletion
+15
-134
src/vnode/CMakeLists.txt
src/vnode/CMakeLists.txt
+1
-0
src/vnode/common/CMakeLists.txt
src/vnode/common/CMakeLists.txt
+0
-13
src/vnode/common/src/vnodePeer.c_del
src/vnode/common/src/vnodePeer.c_del
+0
-42
src/vnode/common/tstr/inc/tstring.h
src/vnode/common/tstr/inc/tstring.h
+0
-40
src/vnode/wal/CMakeLists.txt
src/vnode/wal/CMakeLists.txt
+4
-0
src/vnode/wal/inc/vnodeWal.h
src/vnode/wal/inc/vnodeWal.h
+0
-0
src/vnode/wal/src/vnodeWal.c
src/vnode/wal/src/vnodeWal.c
+10
-39
未找到文件。
src/vnode/CMakeLists.txt
浏览文件 @
555c1507
...
...
@@ -2,6 +2,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT
(
TDengine
)
# ADD_SUBDIRECTORY(common)
ADD_SUBDIRECTORY
(
wal
)
ADD_SUBDIRECTORY
(
tsdb
)
# ENABLE_TESTING()
# ADD_SUBDIRECTORY(tests)
src/vnode/common/CMakeLists.txt
已删除
100644 → 0
浏览文件 @
0ed08405
CMAKE_MINIMUM_REQUIRED
(
VERSION 2.8
)
PROJECT
(
TDengine
)
IF
((
TD_LINUX_64
)
OR
(
TD_LINUX_32 AND TD_ARM
))
INCLUDE_DIRECTORIES
(
${
TD_OS_DIR
}
/inc
)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/src/inc
)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/src/util/inc
)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/src/dnode/inc
)
INCLUDE_DIRECTORIES
(
inc
)
AUX_SOURCE_DIRECTORY
(
src SRC
)
ADD_LIBRARY
(
common
${
SRC
}
)
ENDIF
()
src/vnode/common/src/vnodePeer.c_del
已删除
100644 → 0
浏览文件 @
0ed08405
/*
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
*
* This program is free software: you can use, redistribute, and/or modify
* it under the terms of the GNU Affero General Public License, version 3
* or later ("AGPL"), as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#define _DEFAULT_SOURCE
#include "vnode.h"
#include "vnodeStatus.h"
int vnodeInitPeer(int numOfThreads) { return 0; }
void vnodeCleanUpPeer(int vnode) {}
int vnodeForwardToPeer(SMeterObj *pObj, char *cont, int contLen, char action, int sversion) { return 0; }
int vnodeRecoverFromPeer(SVnodeObj *pVnode, int fileId) { return -TSDB_CODE_FILE_CORRUPTED; }
void vnodeCloseAllSyncFds(int vnode) {}
void vnodeBroadcastStatusToUnsyncedPeer(SVnodeObj *pVnode) {}
int vnodeOpenPeerVnode(int vnode) {
SVnodeObj *pVnode = vnodeList + vnode;
pVnode->vnodeStatus = (pVnode->cfg.replications > 1) ? TSDB_VN_STATUS_UNSYNCED : TSDB_VN_STATUS_MASTER;
dPrint("vid:%d, status:%s numOfPeers:%d", vnode, taosGetVnodeStatusStr(pVnode->vnodeStatus), pVnode->cfg.replications - 1);
vnodeUpdateStreamRole(pVnode);
return 0;
}
void vnodeClosePeerVnode(int vnode) {}
void vnodeConfigVPeers(int vnode, int numOfPeers, SVPeerDesc peerDesc[]) {}
\ No newline at end of file
src/vnode/common/tstr/inc/tstring.h
已删除
100644 → 0
浏览文件 @
0ed08405
/* A dynamic string library
*/
#if !defined(_TD_TSTRING_H_)
#define _TD_TSTRING_H_
#include <stdint.h>
#include <string.h>
#define TD_TSTRING_INIT_SIZE 16
typedef
char
*
tstring_t
;
// The string header
typedef
struct
{
int32_t
space
;
// Allocated data space
char
data
[];
}
STStrHdr
;
// Get the data length of the string
#define TSTRLEN(pstr) strlen((char *)pstr)
// Get the real allocated string length
#define TSTRSPACE(pstr) (*(int32_t *)((char *)pstr - sizeof(STStrHdr)))
// Get the available space
#define TSTAVAIL(pstr) (TSTRSPACE(pstr) - TSTRLEN(pstr))
// Create an empty tstring with default size
tstring_t
tdNewTString
();
// Create an empty tstring with size
tstring_t
tdNewTStringWithSize
(
uint32_t
size
);
// Create a tstring with a init value
tstring_t
tdNewTStringWithValue
(
char
*
value
);
// Create a tstring with a init value & size
tstring_t
tdNewTStringWithValueSize
(
char
*
value
,
uint32_t
size
);
tstring_t
tstrcat
(
tstring_t
dest
,
tstring_t
src
);
int32_t
tstrcmp
(
tstring_t
str1
,
tstring_t
str2
);
int32_t
tstrncmp
(
tstring_t
str1
,
tstring_t
str2
,
int32_t
n
);
#endif // _TD_TSTRING_H_
src/vnode/wal/CMakeLists.txt
浏览文件 @
555c1507
AUX_SOURCE_DIRECTORY
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/src SRC
)
ADD_LIBRARY
(
wal
${
SRC
}
)
TARGET_INCLUDE_DIRECTORIES
(
wal PUBLIC
${
CMAKE_CURRENT_SOURCE_DIR
}
/inc
)
\ No newline at end of file
src/vnode/wal/inc/vnode
w
al.h
→
src/vnode/wal/inc/vnode
W
al.h
浏览文件 @
555c1507
文件已移动
src/vnode/
common/inc/vnodePeer.h
→
src/vnode/
wal/src/vnodeWal.c
浏览文件 @
555c1507
...
...
@@ -12,45 +12,16 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdlib.h>
#ifndef TDENGINE_VNODE_PEER_H
#define TDENGINE_VNODEPEER_H
#include "vnodeWal.h"
#ifdef __cplusplus
extern
"C"
{
#endif
typedef
struct
{
/* TODO */
}
SWal
;
#include <stdint.h>
#include <stdbool.h>
#include "taosdef.h"
/*
* Initialize the resources
*/
int32_t
vnodeInitPeers
(
int
numOfThreads
);
/*
* Free the resources
*/
void
vnodeCleanUpPeers
();
/*
* Start a vnode synchronization process
*/
int32_t
vnodeOpenPeer
(
int32_t
vnode
);
/*
* Update the peerinfo of vnode
*/
int32_t
vnodeConfigPeer
(
SVpeerDescArray
msg
);
/*
* Close a vnode synchronization process
*/
void
vnodeCleanUpPeer
(
int32_t
vnode
);
#ifdef __cplusplus
}
#endif
#endif // TDENGINE_VNODEPEER_H
walh
*
vnodeOpenWal
(
int
vnode
,
uint8_t
op
)
{
return
NULL
;
}
int
vnodeCloseWal
(
walh
*
pWal
)
{
return
0
;
}
int
vnodeRenewWal
(
walh
*
pWal
)
{
return
0
;
}
int
vnodeWriteWal
(
walh
*
pWal
,
void
*
cont
,
int
contLen
)
{
return
0
;
}
int
vnodeSyncWal
(
walh
*
pWal
)
{
return
0
;
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录