From: Shawn O. Pearce Date: Sat, 25 Jul 2009 23:30:26 GMT Subject: Re: [JGIT PATCH] Fix WindowCacheGetTest.testCache_TooSmallLimit failures Message-ID: <20090725233026.GH11191@spearce.org> In-Reply-To: <200907260125.32306.robin.rosenberg.lists@dewire.com> Robin Rosenberg wrote: > l?rdag 25 juli 2009 22:00:56 skrev "Shawn O. Pearce" : > > Ever since 2d77d30b5f when I rewrote WindowCache we have been seeing > > random failures inside of the TooSmallLimit test case. > > > > These test failures have been occurring because the cache contained > > more open bytes than it was configured to permit. > > > > The cache was permitted to open more bytes than its configured limit > > because the eviction routine was always skipping the last bucket > > under some conditions. If the cache table was sized the same as its > > evictBatch, which happens for any fairly small table, the eviction > > routine broke too early if it started at a non-zero position in the > > table and wrapped around during its search. By breaking too early > > the routine did not actually perform an eviction, leaving windows > > open it should have closed. > > We should have a test for that then. We did, this one. :-) -- Shawn.