提交 25ff54c9 编写于 作者: H hjxilinx

impose uid check for submit blocks, refer to #606

上级 4e45a4fd
......@@ -131,6 +131,7 @@ extern "C" {
#define TSDB_CODE_FILE_BLOCK_TS_DISORDERED 108 // time stamp in file block is disordered
#define TSDB_CODE_INVALID_COMMIT_LOG 109 // invalid commit log may be caused by insufficient sotrage
#define TSDB_CODE_SERVER_NO_SPACE 110
#define TSDB_CODE_INVALID_SUBMIT_MSG 111
// message type
#define TSDB_MSG_TYPE_REG 1
......
......@@ -235,4 +235,5 @@ char *tsError[] = {"success",
"timestamp disordered in file block",
"invalid commit log",
"server no disk space",
"invalid submit message",
};
......@@ -510,6 +510,13 @@ int vnodeProcessShellSubmitRequest(char *pMsg, int msgLen, SShellObj *pObj) {
goto _submit_over;
}
if (pMeterObj->uid != pBlocks->uid) {
dError("vid:%d sid:%d, meterId:%s, uid:%lld, uid in msg:%lld, uid mismatch", vnode, sid, pMeterObj->meterId,
pMeterObj->uid, pBlocks->uid);
code = TSDB_CODE_INVALID_SUBMIT_MSG;
goto _submit_over;
}
// dont include sid, vid
int subMsgLen = sizeof(pBlocks->numOfRows) + htons(pBlocks->numOfRows) * pMeterObj->bytesPerPoint;
int sversion = htonl(pBlocks->sversion);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册