-C Typo\sfixes\sin\scomments.\s\sNo\schanges\sto\scode.
-D 2018-03-01T18:09:02.014
+C Optimize\sthe\sobscure\scase\sof\srunning\sa\scheckpoint\sagainst\sa\svery\slarge\swal\nfile\sfor\swhich\sa\slarge\spercentage\sof\sthe\sframes\shave\salready\sbeen\scheckpointed.
+D 2018-03-02T15:42:20.479
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F Makefile.in a2d2fb8d17c39ab5ec52beb27850b903949080848236923f436156b72a958737
F src/vdbetrace.c 48e11ebe040c6b41d146abed2602e3d00d621d7ebe4eb29b0a0f1617fd3c2f6c
F src/vtab.c 0e4885495172e1bdf54b12cce23b395ac74ef5729031f15e1bc1e3e6b360ed1a
F src/vxworks.h d2988f4e5a61a4dfe82c6524dd3d6e4f2ce3cdb9
-F src/wal.c 0ba9af2589b67c4bc60c773c7d2080491099037af21e73545f932bb29bf70b65
+F src/wal.c 6390a0f2779f0e3a8bfb47161575306f3078aed982334ea460506a4bdb168448
F src/wal.h 8de5d2d3de0956d6f6cb48c83a4012d5f227b8fe940f3a349a4b7e85ebcb492a
F src/walker.c da987a20d40145c0a03c07d8fefcb2ed363becc7680d0500d9c79915591f5b1f
F src/where.c 7cae47e813393d70c6d327fdf000fcb30f76b1b0b5a5b52ff6402e0c658de32c
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 2c01c72e357296d761493aac47329f15d87afcada2b39606fc018af0e0011bb5
-R 74d9f04f790ae61bbdb4bfdda923d919
-U mistachkin
-Z 6963c71440aaaba3f2df4c41ff5161b5
+P 1293d4f64f322ee57510bdff497c54e0be2c9205217e1fd96887bba1f36bec40
+R 42a85dafbb1d61300db520734eab6ba4
+U dan
+Z fabb1aba79ebdc43ca9f460d856c2385
-1293d4f64f322ee57510bdff497c54e0be2c9205217e1fd96887bba1f36bec40
\ No newline at end of file
+0f5057dffa9be1bccab04894709d25bf1f066c4b1aef50d67ee635d46d300a4d
\ No newline at end of file
/*
** Construct a WalInterator object that can be used to loop over all
-** pages in the WAL in ascending order. The caller must hold the checkpoint
-** lock.
+** pages in the WAL following frame nBackfill in ascending order. Frames
+** nBackfill or earlier may be included - excluding them is an optimization
+** only. The caller must hold the checkpoint lock.
**
** On success, make *pp point to the newly allocated WalInterator object
** return SQLITE_OK. Otherwise, return an error code. If this routine
** The calling routine should invoke walIteratorFree() to destroy the
** WalIterator object when it has finished with it.
*/
-static int walIteratorInit(Wal *pWal, WalIterator **pp){
+static int walIteratorInit(Wal *pWal, u32 nBackfill, WalIterator **pp){
WalIterator *p; /* Return value */
int nSegment; /* Number of segments to merge */
u32 iLast; /* Last frame in log */
rc = SQLITE_NOMEM_BKPT;
}
- for(i=0; rc==SQLITE_OK && i<nSegment; i++){
+ for(i=walFramePage(nBackfill+1); rc==SQLITE_OK && i<nSegment; i++){
volatile ht_slot *aHash;
u32 iZero;
volatile u32 *aPgno;
if( pInfo->nBackfill<pWal->hdr.mxFrame ){
/* Allocate the iterator */
- rc = walIteratorInit(pWal, &pIter);
+ rc = walIteratorInit(pWal, pInfo->nBackfill, &pIter);
if( rc!=SQLITE_OK ){
return rc;
}