diff options
author | dormando <dormando@rydia.net> | 2016-06-11 21:15:45 -0700 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2016-06-11 21:15:45 -0700 |
commit | 9d9da4a2ea8fc92399c42390e9a679d2ea634c90 (patch) | |
tree | b7f6fd08315b79a3c84406a87a5b0044972e557f /memcached.c | |
parent | 4b7228ed75aafc7428806f92bc3399f16b928a90 (diff) | |
download | memcached-logging_next.tar.gz |
remove "logger chunks", add individualized streamslogging_next
Stop doing a multi-reader circular buffer structure on top of a circular
buffer. Also adds individualized streams based off of the central buffer.
Sadly this requires managing iovecs and dealing with partial writes into said
iovecs. That makes things very complicated. Since it's not clear to me how to
simplify it too much (as of this writing), one of the next commits should
remove iovecs and instead give each watcher its own circular buffer. The
parser thread will copy watched events into each buffer.
The above would only be slower for the case of many watchers watching the same
event streams. Given all of the extra loops required for managing the iovecs,
and the more complicated syscall handling, it might even be the same speed to
manage multiple buffers anyway.
I completed this intermediary change since it simplifies the surrounding code
and was educational to fiddle with iovecs again.
Diffstat (limited to 'memcached.c')
-rw-r--r-- | memcached.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/memcached.c b/memcached.c index a07d356..76dde89 100644 --- a/memcached.c +++ b/memcached.c @@ -3445,7 +3445,7 @@ static void process_command(conn *c, char *command) { MEMCACHED_PROCESS_COMMAND_START(c->sfd, c->rcurr, c->rbytes); - if (c->thread->l->eflags & LOG_FETCHERS) + if (c->thread->l->eflags & LOG_RAWCMDS) logger_log(c->thread->l, LOGGER_ASCII_CMD, NULL, c->sfd, command); /* @@ -3681,15 +3681,15 @@ static void process_command(conn *c, char *command) { /* TODO: pass to function for full argument processing. */ /* This is very temporary... need to decide on a real flag parser. */ if (ntokens == 3) { - if ((strcmp(tokens[COMMAND_TOKEN + 1].value, "fetchers") == 0)) { - f |= LOG_FETCHERS; + if ((strcmp(tokens[COMMAND_TOKEN + 1].value, "rawcmds") == 0)) { + f |= LOG_RAWCMDS; } else if ((strcmp(tokens[COMMAND_TOKEN + 1].value, "evictions") == 0)) { f |= LOG_EVICTIONS; } else { out_string(c, "ERROR"); } } else { - f |= LOG_FETCHERS; + f |= LOG_RAWCMDS; } f |= LOG_TIME; /* not optional yet */ switch(logger_add_watcher(c, c->sfd, f)) { |