Permalink
Browse files

bug 2231 - more printfs on hash choice

Change-Id: Iad197c5aab5fdff04704b0bd1b4792fa7339b62b
  • Loading branch information...
1 parent 5262a4c commit 0bdb4346bd3543dbdaa90d5901d88e18dfa66faf @steveyen steveyen committed Sep 1, 2010
Showing with 10 additions and 0 deletions.
  1. +10 −0 mcs.c
View
10 mcs.c
@@ -8,6 +8,7 @@
#include <unistd.h>
#include <fcntl.h>
#include <assert.h>
+#include "memcached.h"
#include "mcs.h"
#include "log.h"
@@ -30,14 +31,23 @@ uint32_t lmc_key_hash(mcs_st *ptr, const char *key, size_t key_length, int *vbuc
mcs_st *mcs_create(mcs_st *ptr, const char *config) {
#ifdef MOXI_USE_LIBVBUCKET
if (config[0] == '{') {
+ if (settings.verbose > 2) {
+ moxi_log_write("mcs_create using libvbucket\n");
+ }
return lvb_create(ptr, config);
}
#endif
#ifdef MOXI_USE_LIBMEMCACHED
if (config[0] != '{') {
+ if (settings.verbose > 2) {
+ moxi_log_write("mcs_create using libmemcached\n");
+ }
return lmc_create(ptr, config);
}
#endif
+ moxi_log_write("ERROR: unconfigured hash library\n");
+ exit(1);
+
return NULL;
}

0 comments on commit 0bdb434

Please sign in to comment.