Merge pull request #1138 from taosdata/hzcheng
Add some assert for debug
This commit is contained in:
commit
1ab393c2a4
|
@ -966,6 +966,7 @@ void vnodeSetCommitQuery(SMeterObj *pObj, SQuery *pQuery) {
|
||||||
pObj->vnode, pObj->sid, pObj->meterId, firstKey, pQuery->skey);
|
pObj->vnode, pObj->sid, pObj->meterId, firstKey, pQuery->skey);
|
||||||
pthread_mutex_lock(&(pVnode->vmutex));
|
pthread_mutex_lock(&(pVnode->vmutex));
|
||||||
if (firstKey < pVnode->firstKey) pVnode->firstKey = firstKey;
|
if (firstKey < pVnode->firstKey) pVnode->firstKey = firstKey;
|
||||||
|
assert(pVnode->firstKey > 0);
|
||||||
pthread_mutex_unlock(&(pVnode->vmutex));
|
pthread_mutex_unlock(&(pVnode->vmutex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -655,6 +655,7 @@ int vnodeInsertPoints(SMeterObj *pObj, char *cont, int contLen, char source, voi
|
||||||
if (pObj->lastKey > pVnode->lastKey) pVnode->lastKey = pObj->lastKey;
|
if (pObj->lastKey > pVnode->lastKey) pVnode->lastKey = pObj->lastKey;
|
||||||
|
|
||||||
if (firstKey < pVnode->firstKey) pVnode->firstKey = firstKey;
|
if (firstKey < pVnode->firstKey) pVnode->firstKey = firstKey;
|
||||||
|
assert(pVnode->firstKey > 0);
|
||||||
|
|
||||||
pVnode->version++;
|
pVnode->version++;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue