mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-27 20:41:58 +03:00
Fix an LSM problem causing the wrong amount of "auto-work" to be performed
under fairly obscure circumstances. FossilOrigin-Name: a4876672edea4e96103efd2463ce9a34a0b994a8744c941660940578aafbd454
This commit is contained in:
@ -5252,16 +5252,15 @@ static int doLsmSingleWork(
|
||||
/* If the in-memory part of the free-list is too large, write a new
|
||||
** top-level containing just the in-memory free-list entries to disk. */
|
||||
if( rc==LSM_OK && pDb->pWorker->freelist.nEntry > pDb->nMaxFreelist ){
|
||||
int nPg = 0;
|
||||
while( rc==LSM_OK && lsmDatabaseFull(pDb) ){
|
||||
int nPg = 0;
|
||||
rc = sortedWork(pDb, 16, nMerge, 1, &nPg);
|
||||
nRem -= nPg;
|
||||
}
|
||||
if( rc==LSM_OK ){
|
||||
rc = sortedNewFreelistOnly(pDb);
|
||||
}
|
||||
nRem -= nPg;
|
||||
if( nPg ) bDirty = 1;
|
||||
bDirty = 1;
|
||||
}
|
||||
|
||||
if( rc==LSM_OK ){
|
||||
|
Reference in New Issue
Block a user