提交 d9cbbddc 编写于 作者: Y yihaoDeng

TD-1589

上级 33af9c27
......@@ -151,6 +151,16 @@ STableInfo *tsdbGetTableInfo(TSDB_REPO_T *pRepo, STableId tid);
*/
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
typedef void *TsdbQueryHandleT; // Use void to hide implementation details
......
......@@ -211,6 +211,10 @@ int32_t tsdbInsertData(TSDB_REPO_T *repo, SSubmitMsg *pMsg, SShellSubmitRspMsg *
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) {
STsdbRepo *pRepo = (STsdbRepo *)repo;
// STsdbMeta *pMeta = pRepo->tsdbMeta;
......
......@@ -131,6 +131,17 @@ static int32_t vnodeProcessSubmitMsg(SVnodeObj *pVnode, void *pCont, SRspRet *pR
}
static int32_t vnodeProcessDeleteMsg(SVnodeObj *pVnode, void *pCont, SRspRet *pRet) {
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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册