Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
d9cbbddc
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看板
提交
d9cbbddc
编写于
10月 21, 2020
作者:
Y
yihaoDeng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
TD-1589
上级
33af9c27
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
25 addition
and
0 deletion
+25
-0
src/inc/tsdb.h
src/inc/tsdb.h
+10
-0
src/tsdb/src/tsdbMain.c
src/tsdb/src/tsdbMain.c
+4
-0
src/vnode/src/vnodeWrite.c
src/vnode/src/vnodeWrite.c
+11
-0
未找到文件。
src/inc/tsdb.h
浏览文件 @
d9cbbddc
...
@@ -151,6 +151,16 @@ STableInfo *tsdbGetTableInfo(TSDB_REPO_T *pRepo, STableId tid);
...
@@ -151,6 +151,16 @@ STableInfo *tsdbGetTableInfo(TSDB_REPO_T *pRepo, STableId tid);
*/
*/
int32_t
tsdbInsertData
(
TSDB_REPO_T
*
repo
,
SSubmitMsg
*
pMsg
,
SShellSubmitRspMsg
*
pRsp
);
int32_t
tsdbInsertData
(
TSDB_REPO_T
*
repo
,
SSubmitMsg
*
pMsg
,
SShellSubmitRspMsg
*
pRsp
);
// -- FOR DELETE DATA
/**
* Delete data from a table in a repository
* @param pRepo the TSDB repository handle
* @param pData the rows to delete (will give a more specific description)
*
* @return the number of row deleted, -1 for failure and the error number is set
*/
int32_t
tsdbDeleteData
(
TSDB_REPO_T
*
repo
,
SDeleteMsg
*
pMsg
,
SShellSubmitRspMsg
*
pRsp
);
// -- FOR QUERY TIME SERIES DATA
// -- FOR QUERY TIME SERIES DATA
typedef
void
*
TsdbQueryHandleT
;
// Use void to hide implementation details
typedef
void
*
TsdbQueryHandleT
;
// Use void to hide implementation details
...
...
src/tsdb/src/tsdbMain.c
浏览文件 @
d9cbbddc
...
@@ -211,6 +211,10 @@ int32_t tsdbInsertData(TSDB_REPO_T *repo, SSubmitMsg *pMsg, SShellSubmitRspMsg *
...
@@ -211,6 +211,10 @@ int32_t tsdbInsertData(TSDB_REPO_T *repo, SSubmitMsg *pMsg, SShellSubmitRspMsg *
return
0
;
return
0
;
}
}
int32_t
tsdbDeleteData
(
TSDB_REPO_T
*
repo
,
SDeleteMsg
*
pMsg
,
SShellSubmitRspMsg
*
pRsp
)
{
//STsdbRepo * pRepo = (STsdbRepo *)repo;
return
-
1
;
}
uint32_t
tsdbGetFileInfo
(
TSDB_REPO_T
*
repo
,
char
*
name
,
uint32_t
*
index
,
uint32_t
eindex
,
int64_t
*
size
)
{
uint32_t
tsdbGetFileInfo
(
TSDB_REPO_T
*
repo
,
char
*
name
,
uint32_t
*
index
,
uint32_t
eindex
,
int64_t
*
size
)
{
STsdbRepo
*
pRepo
=
(
STsdbRepo
*
)
repo
;
STsdbRepo
*
pRepo
=
(
STsdbRepo
*
)
repo
;
// STsdbMeta *pMeta = pRepo->tsdbMeta;
// STsdbMeta *pMeta = pRepo->tsdbMeta;
...
...
src/vnode/src/vnodeWrite.c
浏览文件 @
d9cbbddc
...
@@ -131,6 +131,17 @@ static int32_t vnodeProcessSubmitMsg(SVnodeObj *pVnode, void *pCont, SRspRet *pR
...
@@ -131,6 +131,17 @@ static int32_t vnodeProcessSubmitMsg(SVnodeObj *pVnode, void *pCont, SRspRet *pR
}
}
static
int32_t
vnodeProcessDeleteMsg
(
SVnodeObj
*
pVnode
,
void
*
pCont
,
SRspRet
*
pRet
)
{
static
int32_t
vnodeProcessDeleteMsg
(
SVnodeObj
*
pVnode
,
void
*
pCont
,
SRspRet
*
pRet
)
{
int32_t
code
=
TSDB_CODE_SUCCESS
;
int32_t
code
=
TSDB_CODE_SUCCESS
;
vTrace
(
"vgId:%d, delete msg is processed"
,
pVnode
->
vgId
);
// save insert result into item
SShellSubmitRspMsg
*
pRsp
=
NULL
;
if
(
pRet
)
{
pRet
->
len
=
sizeof
(
SShellSubmitRspMsg
);
pRet
->
rsp
=
rpcMallocCont
(
pRet
->
len
);
pRsp
=
pRet
->
rsp
;
}
if
(
tsdbDeleteData
(
pVnode
->
tsdb
,
pCont
,
pRsp
)
<
0
)
code
=
terrno
;
return
code
;
return
code
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录