allen8807 / memcached

Automatically exported from code.google.com/p/memcached
0 stars 0 forks source link

binary GET request does not handle ENGINE_TMPFAIL #263

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In current 1.6 trees, if the engine responds to a binary GET request with 
ENGINE_TMPFAIL, memcached will print "Unknown error code: 13" and abort.

Suggested patch:

=== modified file 'daemon/memcached.c'
--- daemon/memcached.c  2011-09-20 05:13:01 +0000
+++ daemon/memcached.c  2012-04-05 23:58:46 +0000
@@ -1761,6 +1761,10 @@
     case ENGINE_NOT_MY_VBUCKET:
         write_bin_packet(c, PROTOCOL_BINARY_RESPONSE_NOT_MY_VBUCKET, 0);
         break;
+    case ENGINE_TMPFAIL:
+        write_bin_packet(c, PROTOCOL_BINARY_RESPONSE_ETMPFAIL, 0);
+        break;
+
     default:
         /* @todo add proper error handling! */
         settings.extensions.logger->log(EXTENSION_LOG_WARNING, c,

Original issue reported on code.google.com by john.david.duncan on 6 Apr 2012 at 12:03

GoogleCodeExporter commented 9 years ago

Original comment by dorma...@rydia.net on 12 Feb 2013 at 6:59

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
There are other locations where this isn't handled.  I pushed this change up, 
though.

Original comment by dsalli...@gmail.com on 16 Dec 2013 at 7:03

GoogleCodeExporter commented 9 years ago

Original comment by dsalli...@gmail.com on 16 Dec 2013 at 7:03