|
|
@ -328,7 +328,7 @@ enum RepFactory StringToRepFactory(const char* ctype) { |
|
|
|
return kSkipList; |
|
|
|
return kSkipList; |
|
|
|
} |
|
|
|
} |
|
|
|
static enum RepFactory FLAGS_rep_factory; |
|
|
|
static enum RepFactory FLAGS_rep_factory; |
|
|
|
DEFINE_string(memtablerep, "skip_list", ""); |
|
|
|
DEFINE_string(memtablerep, "prefix_hash", ""); |
|
|
|
|
|
|
|
|
|
|
|
static bool ValidatePrefixSize(const char* flagname, int32_t value) { |
|
|
|
static bool ValidatePrefixSize(const char* flagname, int32_t value) { |
|
|
|
if (value < 0 || value > 8) { |
|
|
|
if (value < 0 || value > 8) { |
|
|
@ -1525,6 +1525,12 @@ int main(int argc, char** argv) { |
|
|
|
"not positive!\n"); |
|
|
|
"not positive!\n"); |
|
|
|
exit(1); |
|
|
|
exit(1); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (FLAGS_test_batches_snapshots && FLAGS_prefix_size <= 0) { |
|
|
|
|
|
|
|
fprintf(stderr, |
|
|
|
|
|
|
|
"Error: please specify prefix_size for " |
|
|
|
|
|
|
|
"test_batches_snapshots test!\n"); |
|
|
|
|
|
|
|
exit(1); |
|
|
|
|
|
|
|
} |
|
|
|
if ((FLAGS_readpercent + FLAGS_prefixpercent + |
|
|
|
if ((FLAGS_readpercent + FLAGS_prefixpercent + |
|
|
|
FLAGS_writepercent + FLAGS_delpercent + FLAGS_iterpercent) != 100) { |
|
|
|
FLAGS_writepercent + FLAGS_delpercent + FLAGS_iterpercent) != 100) { |
|
|
|
fprintf(stderr, |
|
|
|
fprintf(stderr, |
|
|
|