Merge pull request #967 from taosdata/hz_master

add a simple assert
This commit is contained in:
slguan 2019-12-20 10:20:56 +08:00 committed by GitHub
commit 3f19b39492
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -1311,6 +1311,7 @@ int vnodeWriteBlockToFile(SMeterObj *pObj, SCompBlock *pCompBlock, SData *data[]
pCompBlock->keyFirst = *((TSKEY *)(data[0]->data)); // hack way to get the key pCompBlock->keyFirst = *((TSKEY *)(data[0]->data)); // hack way to get the key
pCompBlock->keyLast = *((TSKEY *)(data[0]->data + (points - 1) * pObj->schema[0].bytes)); pCompBlock->keyLast = *((TSKEY *)(data[0]->data + (points - 1) * pObj->schema[0].bytes));
pCompBlock->sversion = pObj->sversion; pCompBlock->sversion = pObj->sversion;
assert(pCompBlock->keyFirst <= pCompBlock->keyLast);
return 0; return 0;
} }