@ -573,6 +573,23 @@ int main(int argc, char** argv) {
rocksdb_writebatch_destroy ( wb ) ;
rocksdb_writebatch_destroy ( wb ) ;
}
}
StartPhase ( " writebatch_savepoint " ) ;
{
rocksdb_writebatch_t * wb = rocksdb_writebatch_create ( ) ;
rocksdb_writebatch_set_save_point ( wb ) ;
const char * k_list [ 2 ] = { " z " , " ap " } ;
const size_t k_sizes [ 2 ] = { 1 , 2 } ;
const char * v_list [ 3 ] = { " x " , " y " , " z " } ;
const size_t v_sizes [ 3 ] = { 1 , 1 , 1 } ;
rocksdb_writebatch_putv ( wb , 2 , k_list , k_sizes , 3 , v_list , v_sizes ) ;
rocksdb_writebatch_rollback_to_save_point ( wb , & err ) ;
CheckNoError ( err ) ;
rocksdb_write ( db , woptions , wb , & err ) ;
CheckNoError ( err ) ;
CheckGet ( db , roptions , " zap " , NULL ) ;
rocksdb_writebatch_destroy ( wb ) ;
}
StartPhase ( " writebatch_rep " ) ;
StartPhase ( " writebatch_rep " ) ;
{
{
rocksdb_writebatch_t * wb1 = rocksdb_writebatch_create ( ) ;
rocksdb_writebatch_t * wb1 = rocksdb_writebatch_create ( ) ;