--------------------- PatchSet 11623 Date: 2007/09/01 23:09:32 Author: hno Branch: HEAD Tag: (none) Log: Release private objects on cache rebuild In certain situations private objects may be left lingering in the cache after a restart or crash. This patch automatically releases such objects when the cache is rebuilt. Members: src/store_rebuild.c:1.79->1.80 Index: squid/src/store_rebuild.c =================================================================== RCS file: /cvsroot/squid/squid/src/store_rebuild.c,v retrieving revision 1.79 retrieving revision 1.80 diff -u -r1.79 -r1.80 --- squid/src/store_rebuild.c 4 Jul 2006 21:45:24 -0000 1.79 +++ squid/src/store_rebuild.c 1 Sep 2007 23:09:32 -0000 1.80 @@ -1,6 +1,6 @@ /* - * $Id: store_rebuild.c,v 1.79 2006/07/04 21:45:24 hno Exp $ + * $Id: store_rebuild.c,v 1.80 2007/09/01 23:09:32 hno Exp $ * * DEBUG: section 20 Store Rebuild Routines * AUTHOR: Duane Wessels @@ -102,6 +102,9 @@ * otherwise, set it in the validation procedure */ storeDirUpdateSwapSize(&Config.cacheSwap.swapDirs[e->swap_dirn], e->swap_file_sz, 1); + /* Get rid of private objects. Not useful */ + if (EBIT_TEST(e->flags, KEY_PRIVATE)) + storeRelease(e); if ((++validnum & 0x3FFFF) == 0) debug(20, 1) (" %7d Entries Validated so far.\n", validnum); }