summaryrefslogtreecommitdiff
path: root/memcached.c
Commit message (Collapse)AuthorAgeFilesLines
* fix and test for issue 38 (server does not respond to binary requests)stable-1.3Eric Lambert2009-05-021-35/+38
|
* Don't expose the protocol used to the client api of the statsTrond Norbye2009-04-021-313/+155
| | | | | (dustin) I made some changes to the original growth code to pass in the required size.
* 'stats reset' resets new main stats.dormando2009-04-011-0/+1
|
* Use a bool for the accepting_conns stat.Dustin Sallings2009-03-301-3/+3
|
* two new troubleshooting statsdormando2009-03-301-3/+16
| | | | | | accepting_conns for completeness, and listen_disabled_num to see how many times you've hit maxconns and disabled incoming connections. probably a good stat to monitor and flip out on.
* add a cmd_flush statdormando2009-03-301-1/+7
| | | | | | | shouldn't add much lock contention for just this. I want to add this one stat (mayb a few more?) since it's happened more than once that folks think memcached is broken when a cron or something is calling 'flush_all' once a minute.
* fix a handful of socket listen bugs.dormando2009-03-291-9/+4
| | | | | | | | | AF_UNSPEC is still necessary for UDP sometimes. We guarantee that at least one address returned from getaddrinfo binds successfully, and in cases of lacking network or ipv6 addresses some of those socket() calls might fail. That's normal. We were bailing on them. This change also removes the need to pass AI_ADDRCONFIG on machines with ipv6 stacks disabled.
* using enum for try_read_network/try_read_udp return valueSteve Yen2009-03-261-21/+26
|
* transmit_result enum instead of macro definesSteve Yen2009-03-251-6/+9
|
* Added append_stat function to contain the common stat append stuff.Dustin Sallings2009-03-241-12/+43
|
* Use stat macros for server stats.Dustin Sallings2009-03-241-161/+37
|
* Swap APPEND_STAT parameters so that it makes much more sense.Dustin Sallings2009-03-241-18/+18
|
* Make APPEND_STAT globally available.Dustin Sallings2009-03-241-10/+0
|
* "stats reset" should reset eviction counters as wellTrond Norbye2009-03-241-0/+1
| | | | See: http://code.google.com/p/memcached/issues/detail?id=22
* Fix ascii UDP set (bug36).Eric Lambert2009-03-211-2/+4
| | | | http://code.google.com/p/memcached/issues/detail?id=36
* Add description of -D to usage()Trond Norbye2009-03-191-0/+5
| | | | See: http://code.google.com/p/memcached/issues/detail?id=33
* Fixed -C and -b: (with tests).Dustin Sallings2009-03-191-2/+2
| | | | | Using the settings stats, we can verify the startup effects -C and -b: bring and validate that they were both broken by a recent change.
* Added stats settings.Dustin Sallings2009-03-191-0/+97
| | | | | | Stats settings gives a dump of the overall settings of the server. This is useful for verifying the effect of commandline parameters as well as helping others debug odd behaviors.
* Use safe strto.*l functions for parsing info in text sets.Dustin Sallings2009-03-191-11/+16
| | | | Thanks to Toru for pointing this out.
* Handle 64-bit deltas in incr/decr.Dustin Sallings2009-03-191-2/+2
|
* flesh out safe_strto* util funcs, and make incrdecr use themBrad Fitzpatrick2009-03-191-13/+8
|
* Split the getopt string into multiple lines.Clinton Webb2009-03-181-1/+26
| | | | | | This makes it so that it is a little bit easier to see what parameter goes to what, and to make merges with different paramenters a bit easier to manage.
* Added support for setting backlog queue on command lineChris Goffinet2009-03-151-4/+9
|
* A bit more space for server_stats, and an assertion (bug 27).Dustin Sallings2009-03-131-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I couldn't figure out how to get the stats output big enough to exceed 1024, but I accept it might. I've given it a bit more space here and added an assertion to detect when we fail in case we can figure out how to actually have this occur. Maxing out pretty much everything got me up to 828 bytes: STAT pid 35893 STAT uptime 152 STAT time 1237000260 STAT version 1.3.2 STAT pointer_size 32 STAT rusage_user 0.002487 STAT rusage_system 0.005412 STAT curr_connections 4 STAT total_connections 5 STAT connection_structures 5 STAT cmd_get 18446744073709551610 STAT cmd_set 18446744073709551610 STAT get_hits 18446744073709551610 STAT get_misses 18446744073709551610 STAT delete_misses 18446744073709551610 STAT delete_hits 18446744073709551610 STAT incr_misses 18446744073709551610 STAT incr_hits 18446744073709551610 STAT decr_misses 18446744073709551610 STAT decr_hits 18446744073709551610 STAT cas_misses 18446744073709551610 STAT cas_hits 18446744073709551610 STAT cas_badval 18446744073709551610 STAT bytes_read 1 STAT bytes_written 18446744073709551610 STAT limit_maxbytes 67108864 STAT threads 5 STAT bytes 18446744073709551610 STAT curr_items 4294967290 STAT total_items 4294967290 STAT evictions 18446744073709551610
* Fix alignment bug in append_bin_statsTrond Norbye2009-03-131-20/+16
| | | | See http://code.google.com/p/memcached/issues/detail?id=26
* Have just one field for a connection's current cmd.Dustin Sallings2009-03-101-14/+14
| | | | 316 -> 312
* Moved conn_lock and suffix_lock out of thread.c (the latter wasn't properly ↵Trond Norbye2009-03-101-23/+36
| | | | initialized....)
* Don't avoid binding UDP on IPv6.Dustin Sallings2009-03-091-8/+2
| | | | | | | | | | There was apparently some issue on OS X 10.5 that led to the introduction of this limitation, but it's not clear what the issue was, and all tests pass on OS X 10.5 for me. Assuming we find out what the cause of this issue is, we'll add tests and sure they work fine on all platforms with no (or minimal) loss of functionality.
* Added CAS stats.Dustin Sallings2009-03-071-0/+31
| | | | | | | | | | | | CAS stats break down into three different types: * CAS misses (non-existent key) * CAS hits (key + CAS ID match) * CAS badval (key + CAS ID mismatch) hits and bad-val are slab-specific stats. Specifically, they are both based on the slab ID of the original item (the one being replaced).
* incr/decr statsDustin Sallings2009-03-071-0/+50
|
* Added stats for delete commands.Dustin Sallings2009-03-061-0/+21
| | | | This includes both misses and per-slab hits.
* Push hit and set stats down into per-slab stats.Dustin Sallings2009-03-061-11/+21
|
* Remove some cvs/svn junk from files.Dustin Sallings2009-03-061-2/+0
|
* Moved bytes_read and bytes_written to threadlocal statsTrond Norbye2009-03-061-19/+18
|
* Use threadlocal stats to count the commandsTrond Norbye2009-03-041-41/+47
|
* Drop privileges when running on SolarisTrond Norbye2009-03-031-0/+3
|
* Use AI_ADDRCONFIG more selectively.Evan Klitzke2009-03-011-1/+7
| | | | | | | | This makes running on Linux when disconnected possible. Tests still fail when using the -l option to specify a binding address while offline. This is probably quite unlikely if it weren't for the first test.
* Fix for bug21.Dustin Sallings2009-02-261-3/+4
| | | | | Some strange signness handling around decr caused values that would be signed 64-bit numbers to get dropped to zero.
* Use sysexits exit codes and try to select them a bit better.Dustin Sallings2009-02-241-12/+13
|
* setuid before daemonizationDustin Sallings2009-02-241-16/+16
| | | | | If we daemonize before we try to setuid, we can't properly report a setuid failure.
* Don't use a default case when you mean a specific one.Dustin Sallings2009-02-241-1/+1
| | | | | | In this case, default means "NOT_STORED". Now that these are enums, gcc will fail to compile the switch if a possibility is omitted. A compile failure is much better than runtime weirdness.
* Reformat switch for consistency.Dustin Sallings2009-02-241-19/+19
|
* Convert an if/else chain to a switch. Add default state.Dustin Sallings2009-02-241-4/+13
| | | | | The default was the bigger issue. Defaulting to NOT_STORED is probably OK, but if a new storage type comes up, I'd rather see failures.
* Magic number cleanup in do_store_item.Dustin Sallings2009-02-241-32/+32
| | | | | I saw some stuff like "stored = 3" and realized I had no idea what any of these things actually meant.
* stats detail dump shouldn't use more memory than given.Dustin Sallings2009-02-131-1/+5
| | | | http://code.google.com/p/memcached/issues/detail?id=18
* Fix leaked reference in binary protocol get ops.Dustin Sallings2009-02-131-0/+6
| | | | | | | | This effectively exempted anything that was ever referenced in a binary get from freeing, leading to the evil out of memory exceptions that one should never see in a cache with an LRU. http://code.google.com/p/memcached/issues/detail?id=16
* Remove bad memset call in process_bin_stats.Victor Kirkebo2009-02-131-1/+0
| | | | | | | | | | | | | | | | (Victor found the bug and submitted a bunch of text, I just committed it -- Dustin) Unclear why this exists in the first place (history doesn't show anything significant), but at some point after it was written, it became wrong. As this is a local variable and is not read after this memset and the memset is wrong, I'm taking Victor's path of just removing it. http://code.google.com/p/memcached/issues/detail?id=19 Signed-off-by: Dustin Sallings <dustin@spy.net>
* Fix memory corruption error in stats cachedump.Dustin Sallings2009-02-121-1/+0
| | | | | | | | This should not be used generally, but it assumes all of the keys are null terminated. This change copies all the keys for null-termination (making the process even slower), but is at least somewhat safer.
* Update CAS on non-replace incr/decr.Dustin Sallings2009-02-111-0/+4
| | | | | | | | This fixes a problem reported as bug 15 where incr and decr do not change CAS values when they aren't completely replacing the item (which is the typical case). http://code.google.com/p/memcached/issues/detail?id=15
* Remove an assertion that's pointless due to type checking.Dustin Sallings2009-02-021-1/+0
| | | | an unsigned int is always >= 0