Skip to content
This repository
Browse code

Merge branch 'github_master' into slab_lru

  • Loading branch information...
commit 060a27228c2b77dacfb81cfeea7e2d0dd91740ec 2 parents 3f1086d + b297dc2
Yao Yue thinkingfish authored

Showing 2 changed files with 8 additions and 4 deletions. Show diff stats Hide diff stats

  1. +5 2 notes/TODO
  2. +3 2 src/mc_ascii.c
7 notes/TODO
... ... @@ -1,7 +1,10 @@
  1 +* Add a cmd counter (counter for total # of commands) to stats
  2 +* Reply strings like NOT_FOUND, EXISTS, etc should come from a #define table
  3 +* Add stat to track the memory overhead of hash table and connection module
  4 +* Refactor 'struct setting' to use the preprocessor and a #define table
1 5 * Reintroduce the functionality of MEMCACHED_PORT_FILENAME
2 6 * Reintroduce the functionality of MEMCACHED_HASH_BULK_MOVE
3   -* Reply strings like NOT_FOUND, EXISTS, etc should come from a #define table
4 7 * Move hashing of keys outside the cache_lock; exploring saving hash value in item struct
5 8 * Analyze different hashing algorithms, choose the one that is cheapest
6   -* Add stat to track the memory overhead of hash table and connection module
  9 +* Put a cap the size of hashtables
7 10 * Build a cache warmer or bootstraper, that populates twemcache from a dataset in a file
5 src/mc_ascii.c
@@ -735,14 +735,15 @@ asc_process_update(struct conn *c, struct token *token, int ntoken)
735 735 }
736 736 }
737 737
738   - vlen += CRLF_LEN;
739   - if (vlen < 0 || (vlen - CRLF_LEN) < 0) {
  738 + if (vlen < 0) {
740 739 log_debug(LOG_INFO, "client error on c %d for req of type %d and "
741 740 "invalid vlen %d", c->sd, c->req_type, vlen);
742 741 asc_write_client_error(c);
743 742 return;
744 743 }
745 744
  745 + vlen += CRLF_LEN;
  746 +
746 747 it = item_alloc(key, nkey, flags, time_reltime(exptime), vlen);
747 748 if (it == NULL) {
748 749 log_debug(LOG_DEBUG, "server error on c %d for req of type %d because "

0 comments on commit 060a272

Please sign in to comment.
Something went wrong with that request. Please try again.