Skip to content
Permalink
Browse files
MDEV-19089 part #1: adapt rocksdb_stress suite for MariaDB
  • Loading branch information
spetrunia committed Mar 30, 2019
1 parent 7693421 commit c2d9a34
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 8 deletions.
@@ -0,0 +1,10 @@
if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'rocksdb' AND support IN ('YES', 'DEFAULT', 'ENABLED')`)
{
--skip Test requires engine RocksDB.
}

--disable_query_log
# Table statistics can vary depending on when the memtables are flushed, so
# flush them at the beginning of the test to ensure the test runs consistently.
set global rocksdb_force_flush_memtable_now = true;
--enable_query_log
@@ -0,0 +1,12 @@
--loose-enable-rocksdb
--loose-enable-rocksdb_global_info
--loose-enable-rocksdb_ddl
--loose-enable-rocksdb_cf_options
--loose-enable_rocksdb_perf_context
--loose-enable_rocksdb_perf_context_global
--loose-enable-rocksdb_index_file_map
--loose-enable-rocksdb_dbstats
--loose-enable-rocksdb_cfstats
--loose-enable-rocksdb_lock_info
--loose-enable-rocksdb_trx
--loose-enable-rocksdb_locks
@@ -9,11 +9,12 @@
let $MYSQL_BASEDIR = `SELECT @@BASEDIR`;

let $exec =
python $MYSQL_BASEDIR/mysql-test/suite/rocksdb_stress/t/load_generator.py
-L $MYSQL_TMP_DIR/load_generator.log -H $master_host -t $table
-P $MASTER_MYPORT -n $num_records -m $max_records
-l $num_loaders -c $num_checkers -r $num_requests
-E $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
python
$MYSQL_BASEDIR/storage/rocksdb/mysql-test/rocksdb_stress/t/load_generator.py \
-L $MYSQL_TMP_DIR/load_generator.log -H $master_host -t $table \
-P $MASTER_MYPORT -n $num_records -m $max_records \
-l $num_loaders -c $num_checkers -r $num_requests \
-E $MYSQLTEST_VARDIR/tmp/mysqld.1.expect \
-D $reap_delay;

exec $exec;
@@ -1,5 +1,5 @@
!include include/default_my.cnf
!include suite/rocksdb/my.cnf
!include ../storage/rocksdb/mysql-test/rocksdb/my.cnf
!include suite/rpl/my.cnf

[mysqld.1]
@@ -0,0 +1,2 @@
--plugin-load=$HA_ROCKSDB_SO --default-storage-engine=rocksdb

@@ -0,0 +1,28 @@
package My::Suite::Rocksdb;

use My::SysInfo;

#
# Note: ../rocksdb_sys_vars/suite.pm file has a similar
# function. If you modify this file, consider modifying that one, too.
#
@ISA = qw(My::Suite);
use My::Find;
use File::Basename;
use strict;

sub is_default { not $::opt_embedded_server }

my $sst_dump=
::mtr_exe_maybe_exists(
"$::bindir/storage/rocksdb$::opt_vs_config/sst_dump",
"$::path_client_bindir/sst_dump");
return "RocksDB is not compiled, no sst_dump" unless $sst_dump;
$ENV{MARIAROCKS_SST_DUMP}="$sst_dump";

# Temporarily disable testing under valgrind, due to MDEV-12439
return "RocksDB tests disabled under valgrind" if ($::opt_valgrind);


bless { };

@@ -30,4 +30,4 @@ ENGINE=RocksDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
--let $num_requests = 10000
--let $reap_delay = 0

--source suite/rocksdb_stress/include/rocksdb_stress.inc
--source include/rocksdb_stress.inc
@@ -31,4 +31,4 @@ ENGINE=RocksDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
--let $num_requests = 10000
--let $reap_delay = 180

--source suite/rocksdb_stress/include/rocksdb_stress.inc
--source include/rocksdb_stress.inc

0 comments on commit c2d9a34

Please sign in to comment.