From: wessels <> Date: Wed, 18 Jun 1997 09:06:22 +0000 (+0000) Subject: remove assertion from store rebuild code. A swap log entry might be X-Git-Tag: SQUID_3_0_PRE1~4931 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ccbc48f5116f798b1cdb00b03bf955901d0c4f62;p=thirdparty%2Fsquid.git remove assertion from store rebuild code. A swap log entry might be "newer" if we're in a slow rebuild. In that case the swap log entry should be ignored, assuming the existing entry was added during the rebuild. --- diff --git a/src/store.cc b/src/store.cc index f1e2cd3557..b185332b72 100644 --- a/src/store.cc +++ b/src/store.cc @@ -1,6 +1,6 @@ /* - * $Id: store.cc,v 1.257 1997/06/17 18:58:19 wessels Exp $ + * $Id: store.cc,v 1.258 1997/06/18 03:06:22 wessels Exp $ * * DEBUG: section 20 Storeage Manager * AUTHOR: Harvest Derived @@ -1389,13 +1389,16 @@ storeDoRebuildFromDisk(void *data) * newer entry. */ debug(20, 1) ("WARNING: newer swaplog entry for fileno %08X\n", sfileno); - assert(newer == 0); /* I'm tempted to remove the swapfile here just to be safe, * but there is a bad race condition in the NOVM version if * the swapfile has recently been opened for writing, but * not yet opened for reading. Because we can't map * swapfiles back to StoreEntrys, we don't know the state * of the entry using that file. */ + /* We'll assume the existing entry is valid, probably because + were in a slow rebuild and the the swap file number got taken + and the validation procedure hasn't run. */ + assert(RB->need_to_validate); RB->clashcount++; continue; } else if (e) {