leveldb thrift server uses an incorrect root directory

Summary: The offsets used to speficy hostname and dbdir from the command line were not handled correctly.

Test Plan: none.

Reviewers: heyongqiang

Reviewed By: heyongqiang

Differential Revision: https://reviews.facebook.net/D4683
main
Dhruba Borthakur 13 years ago
parent f16e393658
commit 7c0b5ec54a
  1. 8
      thrift/server_options.h

@ -73,10 +73,10 @@ public:
cache_size_ = l; cache_size_ = l;
} else if (sscanf(argv[i], "--cache_numshardbits=%d%c", &n, &junk) == 1) { } else if (sscanf(argv[i], "--cache_numshardbits=%d%c", &n, &junk) == 1) {
cache_numshardbits_ = n; cache_numshardbits_ = n;
} else if (strncmp(argv[i], "--hostname=", 10) == 0) { } else if (strncmp(argv[i], "--hostname=", 11) == 0) {
hostname_ = argv[i] + 10; hostname_ = argv[i] + 11;
} else if (strncmp(argv[i], "--rootdir=", 9) == 0) { } else if (strncmp(argv[i], "--rootdir=", 10) == 0) {
rootdir_ = argv[i] + 9; rootdir_ = argv[i] + 10;
} else { } else {
fprintf(stderr, "Invalid flag '%s'\n", argv[i]); fprintf(stderr, "Invalid flag '%s'\n", argv[i]);
return false; return false;

Loading…
Cancel
Save