Adjustments to the page cache to try to avoid harmless TSAN warnings.
FossilOrigin-Name: 383437be276719ac1c72688ae81017c63907ac561f2ffb8e42c43b012248f294
This commit is contained in:
+2
-2
@@ -168,6 +168,7 @@ struct PCache1 {
|
||||
unsigned int nMax; /* Configured "cache_size" value */
|
||||
unsigned int n90pct; /* nMax*9/10 */
|
||||
unsigned int iMaxKey; /* Largest key seen since xTruncate() */
|
||||
unsigned int nPurgeableDummy; /* pnPurgeable points here when not used*/
|
||||
|
||||
/* Hash table of all pages. The following variables may only be accessed
|
||||
** when the accessor is holding the PGroup mutex.
|
||||
@@ -785,8 +786,7 @@ static sqlite3_pcache *pcache1Create(int szPage, int szExtra, int bPurgeable){
|
||||
pGroup->mxPinned = pGroup->nMaxPage + 10 - pGroup->nMinPage;
|
||||
pCache->pnPurgeable = &pGroup->nPurgeable;
|
||||
}else{
|
||||
static unsigned int dummyCurrentPage;
|
||||
pCache->pnPurgeable = &dummyCurrentPage;
|
||||
pCache->pnPurgeable = &pCache->nPurgeableDummy;
|
||||
}
|
||||
pcache1LeaveMutex(pGroup);
|
||||
if( pCache->nHash==0 ){
|
||||
|
||||
Reference in New Issue
Block a user