|
12 | 12 | #include "include/org_rocksdb_WriteBatchTest.h"
|
13 | 13 | #include "rocksjni/portal.h"
|
14 | 14 | #include "rocksdb/db.h"
|
| 15 | +#include "rocksdb/immutable_options.h" |
15 | 16 | #include "db/memtable.h"
|
16 | 17 | #include "rocksdb/write_batch.h"
|
17 | 18 | #include "db/write_batch_internal.h"
|
@@ -203,16 +204,18 @@ jbyteArray Java_org_rocksdb_WriteBatchTest_getContents(
|
203 | 204 | auto factory = std::make_shared<rocksdb::SkipListFactory>();
|
204 | 205 | rocksdb::Options options;
|
205 | 206 | options.memtable_factory = factory;
|
206 |
| - rocksdb::MemTable* mem = new rocksdb::MemTable(cmp, options); |
| 207 | + rocksdb::MemTable* mem = new rocksdb::MemTable( |
| 208 | + cmp, rocksdb::ImmutableCFOptions(options), |
| 209 | + rocksdb::MemTableOptions(options)); |
207 | 210 | mem->Ref();
|
208 | 211 | std::string state;
|
209 | 212 | rocksdb::ColumnFamilyMemTablesDefault cf_mems_default(mem, &options);
|
210 | 213 | rocksdb::Status s =
|
211 | 214 | rocksdb::WriteBatchInternal::InsertInto(b, &cf_mems_default);
|
212 | 215 | int count = 0;
|
213 |
| - Arena arena; |
214 |
| - ScopedArenaIterator iter(mem->NewIterator( |
215 |
| - rocksdb::ReadOptions(), false /*don't enforce total order*/, &arena)); |
| 216 | + rocksdb::Arena arena; |
| 217 | + rocksdb::ScopedArenaIterator iter(mem->NewIterator( |
| 218 | + rocksdb::ReadOptions(), &arena)); |
216 | 219 | for (iter->SeekToFirst(); iter->Valid(); iter->Next()) {
|
217 | 220 | rocksdb::ParsedInternalKey ikey;
|
218 | 221 | memset(reinterpret_cast<void*>(&ikey), 0, sizeof(ikey));
|
|
0 commit comments