Skip to content

Commit 5abae2c

Browse files
committed
[JNI] Fixed a column family related compile error.
Summary: Fixed the following column family related compile error. ./java/rocksjni/write_batch.cc:211:66: error: cannot initialize a parameter of type 'rocksdb::ColumnFamilyMemTables *' with an lvalue of type 'rocksdb::MemTable *' rocksdb::Status s = rocksdb::WriteBatchInternal::InsertInto(b, mem, &options); ^~~ Test Plan: make jni make jtest Reviewers: igor, haobo CC: leveldb Differential Revision: https://reviews.facebook.net/D17577
1 parent 5e2db3b commit 5abae2c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

java/rocksjni/write_batch.cc

+3-1
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,9 @@ jbyteArray Java_org_rocksdb_WriteBatchTest_getContents(
208208
rocksdb::MemTable* mem = new rocksdb::MemTable(cmp, options);
209209
mem->Ref();
210210
std::string state;
211-
rocksdb::Status s = rocksdb::WriteBatchInternal::InsertInto(b, mem, &options);
211+
rocksdb::ColumnFamilyMemTablesDefault cf_mems_default(mem, &options);
212+
rocksdb::Status s =
213+
rocksdb::WriteBatchInternal::InsertInto(b, &cf_mems_default);
212214
int count = 0;
213215
rocksdb::Iterator* iter = mem->NewIterator();
214216
for (iter->SeekToFirst(); iter->Valid(); iter->Next()) {

0 commit comments

Comments
 (0)