@ -12,6 +12,7 @@
# include "include/org_rocksdb_WriteBatchTest.h"
# include "rocksjni/portal.h"
# include "rocksdb/db.h"
# include "rocksdb/immutable_options.h"
# include "db/memtable.h"
# include "rocksdb/write_batch.h"
# include "db/write_batch_internal.h"
@ -203,16 +204,18 @@ jbyteArray Java_org_rocksdb_WriteBatchTest_getContents(
auto factory = std : : make_shared < rocksdb : : SkipListFactory > ( ) ;
rocksdb : : Options options ;
options . memtable_factory = factory ;
rocksdb : : MemTable * mem = new rocksdb : : MemTable ( cmp , options ) ;
rocksdb : : MemTable * mem = new rocksdb : : MemTable (
cmp , rocksdb : : ImmutableCFOptions ( options ) ,
rocksdb : : MemTableOptions ( options ) ) ;
mem - > Ref ( ) ;
std : : string state ;
rocksdb : : ColumnFamilyMemTablesDefault cf_mems_default ( mem , & options ) ;
rocksdb : : Status s =
rocksdb : : WriteBatchInternal : : InsertInto ( b , & cf_mems_default ) ;
int count = 0 ;
Arena arena ;
ScopedArenaIterator iter ( mem - > NewIterator (
rocksdb : : ReadOptions ( ) , false /*don't enforce total order*/ , & arena ) ) ;
rocksdb : : Arena arena ;
rocksdb : : ScopedArenaIterator iter ( mem - > NewIterator (
rocksdb : : ReadOptions ( ) , & arena ) ) ;
for ( iter - > SeekToFirst ( ) ; iter - > Valid ( ) ; iter - > Next ( ) ) {
rocksdb : : ParsedInternalKey ikey ;
memset ( reinterpret_cast < void * > ( & ikey ) , 0 , sizeof ( ikey ) ) ;