Skip to content

Commit

Permalink
Fix request_parse metric when val is empty (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
seppo0010 authored and Yao Yue committed Feb 25, 2017
1 parent 0fcecb0 commit eb1d4b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@ script:
- cmake ..
- make -j
- make check
# - cd ../test && python -m unittest discover
- cd ../test && python -m unittest discover
3 changes: 3 additions & 0 deletions src/protocol/data/memcache/parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,9 @@ parse_req(struct request *req, struct buf *buf)
log_verb("request hdr parsed: %zu bytes scanned, parsing status %d",
buf->rpos - old_rpos, status);
if (req->val == 0 || status != PARSE_OK) {
if (status == PARSE_OK) {
INCR(parse_req_metrics, request_parse);
}
req->rstate = REQ_PARSED;
break;
}
Expand Down

0 comments on commit eb1d4b6

Please sign in to comment.