summaryrefslogtreecommitdiff
path: root/proto_text.c
Commit message (Collapse)AuthorAgeFilesLines
* proxy: replace proxycmds stream with proxyreqsdormando2022-04-081-2/+2
| | | | | | | | | delete the magic logging and require mcp.log_req* be used if you want those types of entries to appear. keeps a separate data stream from "proxyuser" just in case that's useful. proxycmds wasn't able to get enough context to autogenerate useful log lines, so I'd rather not have it in there at all.
* storage: parameterize the compaction thread sleepdormando2022-02-211-0/+3
| | | | | | allows tests to run faster, let users make it sleep longer/less time. Also cuts the sleep time down when actively compacting and coming from high idle.
* proxy: logging improvements + lua mcp.log()dormando2022-02-111-0/+6
| | | | | | | adds watch commands for: proxycmds - internal raw timing log (tbd?) proxyevents - config updates, internal errors, etc proxyuser - logs generated by mcp.log()
* text: raise junk detection limit to 2kdormando2022-02-041-3/+3
| | | | | | this is effectively the size limit of a request... should raise to 4 or 8k but need to more carefully check how rbuf behaves. I think 4k should be safe but 8k might not due to command alignment issues.
* meta: add "proxy tokens" P, L which are ignoreddormando2022-02-041-0/+2
| | | | see doc/protocol.txt
* meta: fix meta deletedormando2022-01-121-2/+1
| | | | compared cas token was always zero...
* meta: fix CAS ('c') return valuesdormando2022-01-121-1/+3
| | | | | | | This should now align with the binary protocol. It might make sense for this to return the _current_ CAS value of the underlying item in the cases of EX... binprot does not currently do this, and the storage code is shared between binary and text so I can't change them independently.
* Track store errors in thread statsKevin Lin2021-11-231-0/+12
| | | | | | Add two new stat keys, `store_too_large` and `store_no_memory`, to track occurrences of storage request rejections due to writing too large of a value and writing beyond available provisioned memory, respectively.
* Fix time-of-check time-of-use bugskokke2021-11-231-8/+7
| | | Fixing 'bugs' of the pattern: 'assert(ptr != 0)' after 'ptr' was already dereferenced
* proxy: initial commit.dormando2021-10-051-4/+10
| | | | | | | | | | | | | | | See BUILD for compilation details. See t/startfile.lua for configuration examples. (see also https://github.com/memcached/memcached-proxylibs for extensions, config libraries, more examples) NOTE: io_uring mode is _not stable_, will crash. As of this commit it is not recommended to run the proxy in production. If you are interested please let us know, as we are actively stabilizing for production use.
* Implement LOG_CONNEVENTS watcher flag for connection state transitionsKevin Lin2021-08-071-0/+5
| | | | | | | | Add support for `watch connevents` to report opened (`conn_new`) and closed (`conn_close`) client connections. Event log lines indicate the connection's remote IP, remote port, and transport type. `conn_close` events additionally supply a reason for the closing the connection.
* meta: response code OK -> HDdormando2021-06-101-6/+30
| | | | | | | | | | | | | | I had the response code as "HD" in the past, but standardized on OK while merging a number of "OK-like" rescodes together. This was a mistake; as many "generic" memcached response codes use "OK". Most of these are management or specialized uncommon commands. With this, a client response parser can know for sure if a response is to a meta command, or some other command. `-o meta_response_old` starttime option has been added, valid for the next 3 months, which switches the response code back from HD to OK. In case any existing users depended on this and need time to migrate.
* meta: fix metaset syntaxdormando2021-06-101-25/+26
| | | | | | | payload length is now part of the main command rather than a flag/token pair. This allows byte swallow to be more reliable in the case of a flag parsing error, and makes sets easier to parse and buffer for servers implementing the protocol.
* meta: repairs to mset commanddormando2021-06-101-61/+105
| | | | | | | allows returning cas value of the new item on set. also fixes an extra space that was tagged onto the response line. which I had not noticed because all of the tests were looking for a space after the response line :( Bad copypasta from the metaget tests.
* meta: more realistic buffer limit for binary keys.dormando2021-06-071-2/+5
|
* meta: 'b' flag for ME to return base64 keysdormando2021-06-071-4/+21
|
* meta: allow base64'ed binary keys with 'b' flagdormando2021-06-071-29/+58
| | | | | ie: ms [key] b if 'k' flag is given and key is binary, returns as binary encoded.
* Fix expiration test to use debugtime commandminkikim892021-06-071-4/+0
|
* Added debugtime commandminkikim892021-06-071-0/+30
|
* 'shutdown graceful' command for raising SIGUSR1Kevin Lin2020-11-201-4/+12
|
* core: move more storage functions to storage.cdormando2020-10-301-2/+3
| | | | | | | extstore.h is now only used from storage.c. starting a path towards getting the storage interface to be more generalized. should be no functional changes.
* main: split binary protocol into proto_bin.cdormando2020-07-021-1/+140
| | | | also some missed text bits.
* main: split text protocol into proto_text.cdormando2020-07-021-0/+2604
export a lot of the connection handling code from memcached.c