diff options
author | dormando <dormando@rydia.net> | 2016-06-12 18:29:44 -0700 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2016-06-16 17:14:35 -0700 |
commit | 1b03a9c6a443eddcff709b4e7c97dbab3eb9534b (patch) | |
tree | 54836233a5ff3c43accea945aa38d1fda5960fe1 /logger.h | |
parent | a4f8b982fa7cd404a007991e99e2f7d53cdef0dc (diff) | |
download | memcached-1b03a9c6a443eddcff709b4e7c97dbab3eb9534b.tar.gz |
poll() smarter when full, print skipped count
When lines are skipped to a watcher, a [skipped: n] is printed before
resuming. Also polls full watcher directly once, and will wait until the
outer loop to re-poll.
Think the routine can be simplified... it works so will leave it and revisit
later.
Diffstat (limited to 'logger.h')
-rw-r--r-- | logger.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -82,10 +82,10 @@ enum logger_watcher_type { typedef struct { void *c; /* original connection structure. still with source thread attached */ - int chunks; /* count of chunks stored up */ int sfd; /* client fd */ - uint64_t skipped; /* lines skipped since last successful print */ int id; /* id number for watcher list */ + uint64_t skipped; /* lines skipped since last successful print */ + bool failed_flush; /* recently failed to write out (EAGAIN), wait before retry */ enum logger_watcher_type t; /* stderr, client, syslog, etc */ uint16_t eflags; /* flags we are interested in */ bipbuf_t *buf; /* per-watcher output buffer */ |