summaryrefslogtreecommitdiff
path: root/t/lru-maintainer.t
Commit message (Collapse)AuthorAgeFilesLines
* Find perl via /usr/bin/env instead of directlyDavid CARLIER2022-08-251-1/+1
| | | | | At least FreeBSD has perl in /usr/local/bin/perl and no symlink by default.
* t/lru-maintainer.t: check for WARM item earlierdormando2018-08-111-2/+2
| | | | | | item might get pushed back out as we keep doing work. also use the move counter instead of static number, in case of timing goofups pushing the warm item back out.
* fix flaky lru-maintainer testdormando2018-05-251-0/+12
| | | | | | | | | | OS X test runs seem to run the maintainer thread either at a low priority, or take long enough to bootstrap that it gets into a high sleep backoff... and the test has some racy bits. now, wait for some juggles to happen to ensure the canary value gets rescued. fixes #380
* default to unix sockets for testsdormando2017-07-261-2/+2
| | | | | | | | | | | | | | | Tests have randomly failed to start since the beginning of time, due largely to port assignment. A random local port is tested, then passed onto the daemon to try. If that port (on 0.0.0.0) becomes used in the meantime, it fails. Now, tests default to using unix sockets unique to the pid of the test parent. Some tests still run via the network and have been changed to 127.0.0.1, which should collide less with normal internet connections. Some tests require that due to some timing issues that unix sockets seem to create, and others expect a network in a few cases. Ran the tests with `PARALLEL=9 make test` on my machine for two hours and they didn't fail once.
* move WARM_LRU requires two hits overalldormando2017-01-221-3/+5
| | | | | | | | | | ITEM_FETCHED and ITEM_ACTIVE are now tracked separately. This also ensures these flags are added only when an item would normally be bumped (previously and INCR/DECR, failed store, etc could do it. The original segmented LRU papers require two hits to be considered frequently accessed. It's not completely clear if the initial cache miss counts as a hit in the papers but increasing the frequency required to reach WARM still helps.
* NOEXP_LRU is now TEMP_LRUdormando2017-01-221-10/+10
| | | | | | | Confident the other feature was never used; and if someone wants it, it's easy to restore by allowing exptime of 0 to go into TEMP_LRU. This could possibly become a default, or at least recommended.
* Add test for OOM errors with new LRUdormando2016-10-111-2/+17
|
* relax timing glitch in the lru maintainer testdormando2015-04-251-1/+8
| | | | | | | | | | This test is requiring that the juggler thread runs at all before the stats check happens. I've tried running this under an rPi1 and can't reproduce the race, but for some reason solaris amd64 does. This is likely due to the usleep not working as expected. Unfortunately I don't have direct access to a solaris host, so this is the best I can do for now. The juggler does eventually wake up so I'm unconcerned.
* add `-o expirezero_does_not_evict` featuredormando2015-01-081-1/+35
| | | | | | | | | | When enabled, items with an expiration time of 0 are placed into a separate LRU and are not subject to evictions. This allows a mixed-mode instance where you can have a stronger "guarantee" (not a real guarantee) that items aren't removed from the cache due to low memory. This is a dangerous option, as mixing unevictable items has obvious repercussions.
* basic LRU maintainer tests.dormando2015-01-081-0/+49
this did actually discover the bug in the previous commit..