Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Handle calls to lsm_work() with the nPage parameter set to not greater than zero. Remove some dead code. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | block-redirects |
Files: | files | file ages | folders |
SHA1: |
520f3729b832320b94659181591ba0a2 |
User & Date: | dan 2013-01-26 20:18:38.522 |
Context
2013-01-28
| ||
08:56 | Merge block-redirects branch with trunk. This changes the lsm file format. check-in: 647229e983 user: dan tags: trunk | |
2013-01-26
| ||
20:18 | Handle calls to lsm_work() with the nPage parameter set to not greater than zero. Remove some dead code. Leaf check-in: 520f3729b8 user: dan tags: block-redirects | |
19:17 | Fix problems with redirected blocks in compressed databases. check-in: 930b7e4507 user: dan tags: block-redirects | |
Changes
Changes to src/lsm_sorted.c.
︙ | ︙ | |||
5057 5058 5059 5060 5061 5062 5063 | } /* ** Create a new free-list only top-level segment. Return LSM_OK if successful ** or an LSM error code if some error occurs. */ static int sortedNewFreelistOnly(lsm_db *pDb){ | < < < < < < < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 | } /* ** Create a new free-list only top-level segment. Return LSM_OK if successful ** or an LSM error code if some error occurs. */ static int sortedNewFreelistOnly(lsm_db *pDb){ return sortedNewToplevel(pDb, TREE_NONE, 0); } int lsmSaveWorker(lsm_db *pDb, int bFlush){ Snapshot *p = pDb->pWorker; if( p->freelist.nEntry>pDb->nMaxFreelist ){ int rc = sortedNewFreelistOnly(pDb); if( rc!=LSM_OK ) return rc; |
︙ | ︙ | |||
5244 5245 5246 5247 5248 5249 5250 | *pnWrite = 0; } assert( pDb->pWorker==0 ); return rc; } static int doLsmWork(lsm_db *pDb, int nMerge, int nPage, int *pnWrite){ | | | < > > > | | | | | | | | | > | 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 | *pnWrite = 0; } assert( pDb->pWorker==0 ); return rc; } static int doLsmWork(lsm_db *pDb, int nMerge, int nPage, int *pnWrite){ int rc = LSM_OK; /* Return code */ int nWrite = 0; /* Number of pages written */ assert( nMerge>=1 ); if( nPage>0 ){ int bCkpt = 0; do { int nThis = 0; bCkpt = 0; rc = doLsmSingleWork(pDb, 0, nMerge, nPage-nWrite, &nThis, &bCkpt); nWrite += nThis; if( rc==LSM_OK && bCkpt ){ rc = lsm_checkpoint(pDb, 0); } }while( rc==LSM_OK && (nWrite<nPage && bCkpt) ); } if( pnWrite ){ if( rc==LSM_OK ){ *pnWrite = nWrite; }else{ *pnWrite = 0; } |
︙ | ︙ |