Dump routine to BlockBasedTableReader (valgrind)

Summary: Fixed valgrind issue

Test Plan: valgrind check done

Reviewers: rven, sdong

Reviewed By: sdong

Subscribers: sdong, dhruba

Differential Revision: https://reviews.facebook.net/D30699
This commit is contained in:
Manish Patil 2014-11-30 19:00:31 -08:00
parent ddc81440d5
commit 2067058a60

View File

@ -47,13 +47,13 @@ void createSST(const std::string& file_name,
Options opts;
const ImmutableCFOptions imoptions(opts);
rocksdb::InternalKeyComparator ikc(opts.comparator);
TableBuilder* tb = nullptr;
unique_ptr<TableBuilder> tb;
env->NewWritableFile(file_name, &file, env_options);
opts.table_factory = tf;
tb = opts.table_factory->NewTableBuilder(imoptions, ikc, file.get(),
CompressionType::kNoCompression,
CompressionOptions());
tb.reset(opts.table_factory->NewTableBuilder(imoptions, ikc, file.get(),
CompressionType::kNoCompression,
CompressionOptions()));
// Populate slightly more than 1K keys
uint32_t num_keys = 1024;