TDengine/source/dnode/vnode/impl/src/vnodeWrite.c

50 lines
1.3 KiB
C
Raw Normal View History

/*
* 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/>.
*/
2021-11-08 02:32:36 +00:00
#include "vnodeDef.h"
2021-11-08 02:58:46 +00:00
static int vnodeApplyWriteRequest(SVnode *pVnode, const SRequest *pRequest);
2021-11-08 02:32:36 +00:00
int vnodeProcessWriteReqs(SVnode *pVnode, SReqBatch *pReqBatch) {
/* TODO */
return 0;
}
int vnodeApplyWriteReqs(SVnode *pVnode, SReqBatch *pReqBatch) {
2021-11-08 02:58:46 +00:00
SReqBatchIter rbIter;
tdInitRBIter(&rbIter, pReqBatch);
for (;;) {
const SRequest *pReq = tdRBIterNext(&rbIter);
if (pReq == NULL) {
break;
}
if (vnodeApplyWriteRequest(pVnode, pReq) < 0) {
// TODO
}
}
tdClearRBIter(&rbIter);
return 0;
}
/* ------------------------ STATIC METHODS ------------------------ */
static int vnodeApplyWriteRequest(SVnode *pVnode, const SRequest *pRequest) {
2021-11-08 02:32:36 +00:00
/* TODO */
return 0;
}