solve the problem of table_factory_to_write_=nullptr (#1342)

main
panfengfeng 8 years ago committed by Siying Dong
parent d78a4401b5
commit 7afbb7420b
  1. 6
      table/adaptive_table_factory.cc

@ -20,9 +20,6 @@ AdaptiveTableFactory::AdaptiveTableFactory(
block_based_table_factory_(block_based_table_factory),
plain_table_factory_(plain_table_factory),
cuckoo_table_factory_(cuckoo_table_factory) {
if (!table_factory_to_write_) {
table_factory_to_write_ = block_based_table_factory_;
}
if (!plain_table_factory_) {
plain_table_factory_.reset(NewPlainTableFactory());
}
@ -32,6 +29,9 @@ AdaptiveTableFactory::AdaptiveTableFactory(
if (!cuckoo_table_factory_) {
cuckoo_table_factory_.reset(NewCuckooTableFactory());
}
if (!table_factory_to_write_) {
table_factory_to_write_ = block_based_table_factory_;
}
}
extern const uint64_t kPlainTableMagicNumber;

Loading…
Cancel
Save