solve the problem of table_factory_to_write_=nullptr (#1342)

This commit is contained in:
panfengfeng 2016-09-21 01:11:51 +08:00 committed by Siying Dong
parent d78a4401b5
commit 7afbb7420b

View File

@ -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;