enh: code optimization
This commit is contained in:
parent
af18343633
commit
54458c1f59
|
@ -311,7 +311,7 @@ static int tsdbNextCommitFid(SCommitH *pCommith) {
|
|||
|
||||
for (int i = 0; i < pCommith->niters; i++) {
|
||||
SCommitIter *pIter = pCommith->iters + i;
|
||||
if (pIter->pTable == NULL || pIter->pIter == NULL) continue;
|
||||
// if (pIter->pTable == NULL || pIter->pIter == NULL) continue;
|
||||
|
||||
TSKEY nextKey = tsdbNextIterKey(pIter->pIter);
|
||||
if (nextKey == TSDB_DATA_TIMESTAMP_NULL) {
|
||||
|
@ -464,12 +464,12 @@ static int tsdbCreateCommitIters(SCommitH *pCommith) {
|
|||
pTbData = (STbData *)pNode->pData;
|
||||
|
||||
pCommitIter = pCommith->iters + i;
|
||||
pCommitIter->pIter = tSkipListCreateIter(pTbData->pData);
|
||||
tSkipListIterNext(pCommitIter->pIter);
|
||||
|
||||
pTSchema = metaGetTbTSchema(REPO_META(pRepo), pTbData->uid, 0); // TODO: schema version
|
||||
|
||||
if (pTSchema) {
|
||||
pCommitIter->pIter = tSkipListCreateIter(pTbData->pData);
|
||||
tSkipListIterNext(pCommitIter->pIter);
|
||||
|
||||
pCommitIter->pTable = (STable *)taosMemoryMalloc(sizeof(STable));
|
||||
pCommitIter->pTable->uid = pTbData->uid;
|
||||
pCommitIter->pTable->tid = pTbData->uid;
|
||||
|
|
Loading…
Reference in New Issue