summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix problem with "Failed to write, and not due to blocking"failed-to-write-fixTrond Norbye2012-09-051-10/+9
| | | | | | It has been observed in strace output that we sometimes call sendmsg with a request of sending 0 bytes.. The kernel obeys our request and send 0 bytes and we treat that as an error.
* Add some mild thread documentation1.4.15dormando2012-09-031-0/+46
| | | | since reading the code is probably incredibly confusing now.
* don't wait on condition without holding the lockdormando2012-09-031-1/+2
| | | | freebsd9 is the only platform that apparently cares about this.
* README.md was missing from dist tarballdormando2012-09-031-1/+1
|
* remove global stats lock from item allocationdormando2012-09-036-18/+29
| | | | | | | | | | This doesn't reduce mutex contention much, if at all, for the global stats lock, but it does remove a handful of instructions from the alloc hot path, which is always worth doing. Previous commits possibly added a handful of instructions for the loop and for the bucket readlock trylock, but this is still faster than .14 for writes overall.
* item locks now lock hash table bucketsdormando2012-09-037-31/+178
| | | | | | | | | | expansion requires switching to a global lock temporarily, so all buckets have a covered read lock. slab rebalancer is paused during hash table expansion. internal item "trylocks" are always issued, and tracked as the hash power variable can change out from under it.
* alloc loop now attempts an item_lockdormando2012-09-036-84/+111
| | | | | | | | | | | | | | | | Fixes a few issues with a restructuring... I think -M was broken before, should be fixed now. It had a refcount leak. Now walks up to five items from the bottom in case of the bottomost items being item_locked, or refcount locked. Helps avoid excessive OOM errors for some oddball cases. Those happen more often if you're hammering on a handful of pages in a very large class size (100k+) The hash item lock ensures that if we're holding that lock, no other thread can be incrementing the refcount lock at that time. It will mean more in future patches. slab rebalancer gets a similar update.
* Issue 286: --disable-coverage drops "-pthread" optionTrond Norbye2012-09-011-5/+3
| | | | -pthread was added as part of setting up the gcov options
* call mutex_unlock() when we use mutex_lock()1.4.14dormando2012-07-304-19/+19
| | | | | use both #define's when using the spinlock version of our locks. not all locks are designed to be that way, so this doesn't touch the whole thing.
* whitespace fix for freebsddormando2012-07-292-1/+2
| | | | I dunno why it litters .orgs then tries to run them. I'm not a magician.
* remove unused variabledormando2012-07-291-2/+0
| | | | fix warning in new gcc.
* stupid whitespace thing pulls in dead filesdormando2012-07-292-2/+2
| | | | | I don't care why it happened, just don't whitespace check the README files anymore.
* descriptive errors for t/whitespace.tdormando2012-07-291-1/+1
|
* fix some binary.t stuffdormando2012-07-291-2/+2
| | | | I broke 'em earlier
* Added support for automake-1.12 in autogen.shEric McConville2012-07-291-1/+1
|
* Use Markdown for README.Toru Maesaka2012-07-291-5/+15
|
* Fixed issue with invalid binary protocol touch command expiration timeMaksim Zhylinski2012-07-291-2/+2
| | | | (http://code.google.com/p/memcached/issues/detail?id=275)
* add a binary touch test that actaully failsdormando2012-07-291-0/+4
|
* totally destroy test cachesdormando2012-07-291-0/+1
| | | | | | | someone pointed out that cache_destroy wasn't freeing the cache_t pointer. memcached itself never destroys a cache it creates, so this is fine, but it's fixed for completeness...
* Define touch command probe for DTrace supportyuryur2012-07-291-0/+11
|
* If we're preallocating memory, prealloc slab pagesdormando2012-07-293-15/+10
| | | | | | | | | | | I'll probably get in trouble for removing DONT_PREALLOC_SLABS ... however tons of people like using the -L option, which does nothing under linux. It should soon do *something* under linux, and when it does they'll report the same errors of not being able to store things into certain slab classes. So just give them a useful error and bail instead.
* Error and exit if we don't have hugetlb supportdormando2012-07-291-1/+4
| | | | | I imagine host people on linux run this and then get both thumbs stuck up their noses when weird bugs happen. Lets start by not lying to them.
* Fix doc/protocol.txt typoFordy2012-07-291-1/+1
| | | | (I removed the "honoured" fix as this is american english -ed)
* update reassign/automove documentationdormando2012-07-291-2/+12
|
* Remove USE_SYSTEM_MALLOC definedormando2012-07-271-17/+0
| | | | | bitrotted. only existed to prove a point. can add it back in better later, or use a storage engine if we ever get on 1.6.
* remove rebalancer's race conditiondormando2012-07-271-11/+9
| | | | | slabs_reassign() calls now attempt to lock, return busy if thread is already moving something.
* automove levels are an int instead of bool nowdormando2012-07-274-12/+33
| | | | | also fix a bug causing slab rebalance thread to spin instead of waiting on the condition... duhr.
* slab rebalancing from random classdormando2012-07-271-0/+26
| | | | | | | | | specifying -1 as the src class for a slabs reassign will pick the first available, rolling through the list on each request (so as to not bias against the smaller classes). So if you're in a hurry and have to move memory into class 5, you may now mash it without thinking.
* split slab rebalance and automove threadsdormando2012-07-271-10/+53
| | | | | | | | | slab rebalancer now chillaxes on a signal and waits a lot less time when hitting a busy item. automove is its own thread now, and signals rebal when necessary. when entering the command "slabs reassign 1 2" it should start moving a page instantly.
* remove end_page_ptr business from slabsdormando2012-07-273-35/+6
| | | | | | | slab memory assignment used to lazily split a new page into chunks as memory was requested. now it doesn't, so drop all the related code. Cuts the memory assignment hotpath a tiny bit, so that's exciting.
* pre-split slab pages into slab freelistsdormando2012-07-272-9/+24
| | | | | | | | | | | | slab freelists used to be malloc'ed arrays. then they were changed into a freelist. now we pre-split newly assigned/moved pages into a slabs freelist instead of lazily pulling pointers as needed. The loop is pretty darn direct and I can't measure a performance impact of this relatively rare event. In doing this, slab reassign can move memory without having to wait for a class to chew through its recently assigned page first.
* Avoid race condition in test by re-tryingClint Byrum2012-07-271-3/+7
| | | | | (ed note: yes it doesn't check for a NULL and die after 20 times. this should mitigate until we can do better with writing the pidfile)
* - Fix inline issue with older compilers (gcc 4.2.2)1.4.13Steve Wills2012-02-021-2/+2
| | | | | ed note: this needs to be redone in memcached.h as a static inline, or changed to a define.
* Better detection of sasl_callback_ftDustin Sallings2012-02-012-1/+28
|
* fix glitch with flush_all <future>1.4.12dormando2012-02-012-3/+15
| | | | | | | | | reported by jhpark. items at the bottom of the LRU would be popped for sets if flush_all was set for the "future" but said future hadn't arrived yet. item_get handled this correctly so the flush would not happen, but items at the bottom of the LRU would be reclaimed early. Added tests for this as well.
* Skip SASL tests unless RUN_SASL_TESTS is defined.Dustin Sallings2012-01-281-1/+6
| | | | | | | This fails for various stupid platform-specific things. The SASL code can be working correctly, but not in a way that is completely predictable on every platform (for example, we may be missing a particular auth mode).
* Look around for saslpasswd2 (typically not in the user's path).Dustin Sallings2012-01-281-1/+16
|
* Specify hostname in sasl_server_new.Dustin Sallings2012-01-273-1/+15
| | | | | | | | saslpasswd2 does something a little magical when initializing the structure that's different from what happens if you just pass NULL. The magic is too great for the tests as is, so this code does the same thing saslpasswd2 does to determine the fqdn.
* build fix: Define sasl_callback_ft on older versions of sasl.Dustin Sallings2012-01-271-0/+4
| | | | | | | They just changed this randomly with no way to really detect it. You can read about it here: http://lists.andrew.cmu.edu/pipermail/cyrus-sasl/2011-September/002340.html
* fix segfault when sending a zero byte commanddormando2012-01-261-1/+1
| | | | | | echo "" | nc localhost 11211 would segfault the server simple fix is to add the proper token check to the one place it's missing.
* fix warning in UDP testdormando2012-01-261-1/+1
|
* properly detect GCC atomicsdormando2012-01-252-5/+19
| | | | | I was naive. GCC atomics were added in 4.1.2, and not easily detectable without configure tests. 32bit platforms, centos5, etc.
* tests: loop on short binary packet readsDustin Sallings2012-01-251-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Awesome bug goes like this: let "c1" be the commit of the "good state" and "c2" be the commit immediately after (in a bad state). "t1" is the state of the tree in "c1" and "t2" is the state of the tree in "c2" In their natural states, we have this: c1 -> t1 -> success c1 -> t2 -> fail However, if you take c1 -> t1 -> patch to t2 -> success c2 -> t2 -> patch to t1 -> fail So t1 *and* t2 both succeed if the committed tree is c1, but both fail of the committed tree is c2. The difference? c1 has a tag that points to it so the version number is "1.2.10" whereas the version number for the unreleased c2 is "1.4.10-1-gee486ab" -- a bit longer, breaks stuff in tests that try to print stats.
* fix slabs_reassign tests on 32bit hostsdormando2012-01-181-3/+3
| | | | 32bit pointers are smaller... need more items to fill the slabs, sigh.
* update protocol.txt1.4.11-rc11.4.11dormando2012-01-111-0/+57
|
* bug237: Don't compute incorrect argc for timedrunDustin Sallings2012-01-111-4/+2
| | | | | Since spawn_and_wait doesn't use argc anyway, might as well just not send a value in.
* fix 'age' stat for stats itemsdormando2012-01-111-1/+1
| | | | credit goes to anton.yuzhaninov for the report and patch
* binary deletes were not ticking stats countersdormando2012-01-111-0/+6
| | | | Thanks to Stephen Yang for the bug report.
* test for the error code, not the full messagedormando2012-01-111-2/+2
| | | | bad practice.
* more portable refcount atomicsdormando2012-01-104-8/+48
| | | | | | | Most credit to Dustin and Trond for showing me the way, though I have no way of testing this myself. These should probably just be defines...