more
This commit is contained in:
parent
3fdb868a2a
commit
724a371003
|
@ -67,6 +67,13 @@ static FORCE_INLINE SMemRow tsdbNextIterRow(SSkipListIterator *pIter) {
|
||||||
return (SMemRow)SL_GET_NODE_DATA(node);
|
return (SMemRow)SL_GET_NODE_DATA(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static FORCE_INLINE TSKEY tsdbNextIterKey(SSkipListIterator *pIter) {
|
||||||
|
SMemRow row = tsdbNextIterRow(pIter);
|
||||||
|
if (row == NULL) return TSDB_DATA_TIMESTAMP_NULL;
|
||||||
|
|
||||||
|
return memRowKey(row);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -138,10 +138,10 @@ int tsdbCommit(STsdb *pRepo) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
|
|
||||||
// Loop to commit to each file
|
// Loop to commit to each file
|
||||||
fid = tsdbNextCommitFid(&(commith));
|
fid = tsdbNextCommitFid(&(commith));
|
||||||
|
#if 0
|
||||||
while (true) {
|
while (true) {
|
||||||
// Loop over both on disk and memory
|
// Loop over both on disk and memory
|
||||||
if (pSet == NULL && fid == TSDB_IVLD_FID) break;
|
if (pSet == NULL && fid == TSDB_IVLD_FID) break;
|
||||||
|
@ -281,28 +281,28 @@ static void tsdbSeekCommitIter(SCommitH *pCommith, TSKEY key) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// static int tsdbNextCommitFid(SCommitH *pCommith) {
|
static int tsdbNextCommitFid(SCommitH *pCommith) {
|
||||||
// STsdb * pRepo = TSDB_COMMIT_REPO(pCommith);
|
STsdb * pRepo = TSDB_COMMIT_REPO(pCommith);
|
||||||
// STsdbCfg *pCfg = REPO_CFG(pRepo);
|
STsdbCfg *pCfg = REPO_CFG(pRepo);
|
||||||
// int fid = TSDB_IVLD_FID;
|
int fid = TSDB_IVLD_FID;
|
||||||
|
|
||||||
// for (int i = 0; i < pCommith->niters; i++) {
|
for (int i = 0; i < pCommith->niters; i++) {
|
||||||
// SCommitIter *pIter = pCommith->iters + 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);
|
TSKEY nextKey = tsdbNextIterKey(pIter->pIter);
|
||||||
// if (nextKey == TSDB_DATA_TIMESTAMP_NULL) {
|
if (nextKey == TSDB_DATA_TIMESTAMP_NULL) {
|
||||||
// continue;
|
continue;
|
||||||
// } else {
|
} else {
|
||||||
// int tfid = (int)(TSDB_KEY_FID(nextKey, pCfg->daysPerFile, pCfg->precision));
|
int tfid = (int)(TSDB_KEY_FID(nextKey, pCfg->daysPerFile, pCfg->precision));
|
||||||
// if (fid == TSDB_IVLD_FID || fid > tfid) {
|
if (fid == TSDB_IVLD_FID || fid > tfid) {
|
||||||
// fid = tfid;
|
fid = tfid;
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
// return fid;
|
return fid;
|
||||||
// }
|
}
|
||||||
|
|
||||||
static void tsdbDestroyCommitH(SCommitH *pCommith) {
|
static void tsdbDestroyCommitH(SCommitH *pCommith) {
|
||||||
pCommith->pDataCols = tdFreeDataCols(pCommith->pDataCols);
|
pCommith->pDataCols = tdFreeDataCols(pCommith->pDataCols);
|
||||||
|
|
Loading…
Reference in New Issue