impose uid check for submit blocks, refer to #606
This commit is contained in:
parent
4e45a4fd74
commit
25ff54c90c
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue