Skip to content

Commit

Permalink
solve the problem of table_factory_to_write_=nullptr (facebook#1342)
Browse files Browse the repository at this point in the history
  • Loading branch information
panfengfeng authored and siying committed Sep 20, 2016
1 parent d78a440 commit 7afbb74
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions table/adaptive_table_factory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand All @@ -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;
Expand Down

0 comments on commit 7afbb74

Please sign in to comment.