提交 6185cef9 编写于 作者: A Alex Duan

[TS-238]<feature>(tsdb): single table del data first ok

上级 5a5b4bf5
...@@ -1004,6 +1004,7 @@ typedef struct { ...@@ -1004,6 +1004,7 @@ typedef struct {
} STLV; } STLV;
#define CMD_DELETE_DATA 0x00000001 #define CMD_DELETE_DATA 0x00000001
#define CMD_TRUNCATE 0x00000002
typedef struct SControlData{ typedef struct SControlData{
uint32_t command; // see define CMD_??? uint32_t command; // see define CMD_???
STimeWindow win; STimeWindow win;
......
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
// SControlData addition information
typedef struct { typedef struct {
SControlData ctlData; SControlData ctlData;
// addition info // addition info
...@@ -25,11 +27,15 @@ typedef struct { ...@@ -25,11 +27,15 @@ typedef struct {
int32_t tid; // table id int32_t tid; // table id
tsem_t* pSem; tsem_t* pSem;
bool memNull; // pRepo->mem is NULL, this is true bool memNull; // pRepo->mem is NULL, this is true
uint64_t* uids; // delete table
int32_t uidCount;
SShellSubmitRspMsg *pRsp; SShellSubmitRspMsg *pRsp;
} SControlDataInfo; } SControlDataInfo;
void *tsdbTruncateImpl(STsdbRepo *pRepo, void *param); // -------- interface ---------
void *tsdbDeleteImpl(STsdbRepo *pRepo, void *param);
// delete
int tsdbControlDelete(STsdbRepo* pRepo, SControlDataInfo* pCtlDataInfo);
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -1780,17 +1780,6 @@ int tsdbApplyRtn(STsdbRepo *pRepo) { ...@@ -1780,17 +1780,6 @@ int tsdbApplyRtn(STsdbRepo *pRepo) {
return 0; return 0;
} }
int tsdbControlDelete(STsdbRepo* pRepo, SControlDataInfo* pCtlDataInfo) {
int ret = TSDB_CODE_SUCCESS;
if(pCtlDataInfo->pRsp) {
pCtlDataInfo->pRsp->affectedRows = htonl(23);
pCtlDataInfo->pRsp->code = ret;
}
return ret;
}
// do control task // do control task
int tsdbCommitControl(STsdbRepo* pRepo, SControlDataInfo* pCtlDataInfo) { int tsdbCommitControl(STsdbRepo* pRepo, SControlDataInfo* pCtlDataInfo) {
int ret = TSDB_CODE_SUCCESS; int ret = TSDB_CODE_SUCCESS;
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册