From: Robin Rosenberg Date: Sat, 25 Jul 2009 23:25:31 GMT Subject: Re: [JGIT PATCH] Fix WindowCacheGetTest.testCache_TooSmallLimit failures Message-ID: <200907260125.32306.robin.rosenberg.lists@dewire.com> In-Reply-To: <20090725200056.GD11191@spearce.org> 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. -- robin