mirror of
https://github.com/MariaDB/server.git
synced 2026-10-23 18:49:29 +03:00
Merge branch 'bb-10.2-mariarocks' of github.com:MariaDB/server into 10.2
This commit is contained in:
@@ -7162,12 +7162,9 @@ int ha_rocksdb::read_range_first(const key_range *const start_key,
|
||||
int result;
|
||||
|
||||
eq_range = eq_range_arg;
|
||||
#ifdef MARIAROCKS_NOT_YET
|
||||
// Range scan direction is used to get ICP to work for backwards scans
|
||||
set_end_range(end_key, RANGE_SCAN_ASC);
|
||||
#else
|
||||
|
||||
/* MariaDB: Pass RANGE_SCAN_ASC when we support ICP on backwards scans */
|
||||
set_end_range(end_key);
|
||||
#endif
|
||||
|
||||
range_key_part = table->key_info[active_index].key_part;
|
||||
|
||||
|
||||
@@ -3,42 +3,87 @@ DROP DATABASE IF EXISTS mysqlslap;
|
||||
CREATE DATABASE mysqlslap;
|
||||
USE mysqlslap;
|
||||
CREATE TABLE t1(id BIGINT AUTO_INCREMENT, value BIGINT, PRIMARY KEY(id)) ENGINE=rocksdb;
|
||||
SET @save_rocksdb_enable_2pc= @@rocksdb_enable_2pc;
|
||||
SET @save_rocksdb_flush_log_at_trx_commit= @@rocksdb_flush_log_at_trx_commit;
|
||||
# 2PC enabled, MyRocks durability enabled
|
||||
SET GLOBAL rocksdb_enable_2pc=1;
|
||||
SET GLOBAL rocksdb_flush_log_at_trx_commit=1;
|
||||
##
|
||||
## 2PC + durability + single thread
|
||||
select variable_value into @c from information_schema.global_status where variable_name='rocksdb_wal_group_syncs';
|
||||
select case when variable_value-@c = 1000 then 'true' else 'false' end from information_schema.global_status where variable_name='rocksdb_wal_group_syncs';
|
||||
case when variable_value-@c = 1000 then 'true' else 'false' end
|
||||
true
|
||||
##
|
||||
select variable_value into @b1 from information_schema.global_status where variable_name='Binlog_commits';
|
||||
select variable_value into @b2 from information_schema.global_status where variable_name='Binlog_group_commits';
|
||||
select variable_value into @b3 from information_schema.global_status where variable_name='Rocksdb_wal_synced';
|
||||
select IF(variable_value - @b1 = 1000, 'OK', 'FAIL') as Binlog_commits
|
||||
from information_schema.global_status where variable_name='Binlog_commits';
|
||||
Binlog_commits
|
||||
OK
|
||||
select IF(variable_value - @b2 = 1000, 'OK', 'FAIL') as Binlog_group_commits
|
||||
from information_schema.global_status where variable_name='Binlog_group_commits';
|
||||
Binlog_group_commits
|
||||
OK
|
||||
# Prepare operations sync, commits don't. We expect slightly more than 1K syncs:
|
||||
select IF(variable_value - @b3 between 1000 and 1500, 'OK', 'FAIL') as Rocksdb_wal_synced
|
||||
from information_schema.global_status where variable_name='Rocksdb_wal_synced';
|
||||
Rocksdb_wal_synced
|
||||
OK
|
||||
##
|
||||
## 2PC + durability + group commit
|
||||
select variable_value into @c from information_schema.global_status where variable_name='rocksdb_wal_group_syncs';
|
||||
select case when variable_value-@c > 0 and variable_value-@c < 10000 then 'true' else 'false' end from information_schema.global_status where variable_name='rocksdb_wal_group_syncs';
|
||||
case when variable_value-@c > 0 and variable_value-@c < 10000 then 'true' else 'false' end
|
||||
true
|
||||
# 2PC enabled, MyRocks durability disabled
|
||||
##
|
||||
select variable_value into @b1 from information_schema.global_status where variable_name='Binlog_commits';
|
||||
select variable_value into @b2 from information_schema.global_status where variable_name='Binlog_group_commits';
|
||||
select variable_value into @b3 from information_schema.global_status where variable_name='Rocksdb_wal_synced';
|
||||
select IF(variable_value - @b1 = 10000, 'OK', 'FAIL') as Binlog_commits
|
||||
from information_schema.global_status where variable_name='Binlog_commits';
|
||||
Binlog_commits
|
||||
OK
|
||||
select IF(variable_value - @b2 between 100 and 5000, 'OK', 'FAIL') as Binlog_group_commits
|
||||
from information_schema.global_status where variable_name='Binlog_group_commits';
|
||||
Binlog_group_commits
|
||||
OK
|
||||
select IF(variable_value - @b3 between 1 and 9000, 'OK', 'FAIL')
|
||||
from information_schema.global_status where variable_name='Rocksdb_wal_synced';
|
||||
IF(variable_value - @b3 between 1 and 9000, 'OK', 'FAIL')
|
||||
OK
|
||||
##
|
||||
# 2PC enabled, MyRocks durability disabled, single thread
|
||||
##
|
||||
SET GLOBAL rocksdb_enable_2pc=1;
|
||||
SET GLOBAL rocksdb_flush_log_at_trx_commit=0;
|
||||
select variable_value into @c from information_schema.global_status where variable_name='rocksdb_wal_group_syncs';
|
||||
select case when variable_value-@c = 0 then 'true' else 'false' end from information_schema.global_status where variable_name='rocksdb_wal_group_syncs';
|
||||
case when variable_value-@c = 0 then 'true' else 'false' end
|
||||
true
|
||||
select variable_value into @c from information_schema.global_status where variable_name='rocksdb_wal_group_syncs';
|
||||
select case when variable_value-@c = 0 then 'true' else 'false' end from information_schema.global_status where variable_name='rocksdb_wal_group_syncs';
|
||||
case when variable_value-@c = 0 then 'true' else 'false' end
|
||||
true
|
||||
# 2PC disabled, MyRocks durability enabled
|
||||
SET GLOBAL rocksdb_enable_2pc=0;
|
||||
SET GLOBAL rocksdb_flush_log_at_trx_commit=1;
|
||||
select variable_value into @c from information_schema.global_status where variable_name='rocksdb_wal_group_syncs';
|
||||
select case when variable_value-@c = 0 then 'true' else 'false' end from information_schema.global_status where variable_name='rocksdb_wal_group_syncs';
|
||||
case when variable_value-@c = 0 then 'true' else 'false' end
|
||||
true
|
||||
select variable_value into @c from information_schema.global_status where variable_name='rocksdb_wal_group_syncs';
|
||||
select case when variable_value-@c = 0 then 'true' else 'false' end from information_schema.global_status where variable_name='rocksdb_wal_group_syncs';
|
||||
case when variable_value-@c = 0 then 'true' else 'false' end
|
||||
true
|
||||
SET GLOBAL rocksdb_enable_2pc=1;
|
||||
SET GLOBAL rocksdb_flush_log_at_trx_commit=1;
|
||||
select variable_value into @b1 from information_schema.global_status where variable_name='Binlog_commits';
|
||||
select variable_value into @b2 from information_schema.global_status where variable_name='Binlog_group_commits';
|
||||
select variable_value into @b3 from information_schema.global_status where variable_name='Rocksdb_wal_synced';
|
||||
select IF(variable_value - @b1 = 1000, 'OK', 'FAIL') as Binlog_commits
|
||||
from information_schema.global_status where variable_name='Binlog_commits';
|
||||
Binlog_commits
|
||||
OK
|
||||
select IF(variable_value - @b2 = 1000, 'OK', 'FAIL') as Binlog_group_commits
|
||||
from information_schema.global_status where variable_name='Binlog_group_commits';
|
||||
Binlog_group_commits
|
||||
OK
|
||||
select IF(variable_value - @b3 < 10, 'OK', 'FAIL')
|
||||
from information_schema.global_status where variable_name='Rocksdb_wal_synced';
|
||||
IF(variable_value - @b3 < 10, 'OK', 'FAIL')
|
||||
OK
|
||||
##
|
||||
# 2PC enabled, MyRocks durability disabled, concurrent workload
|
||||
##
|
||||
select variable_value into @b1 from information_schema.global_status where variable_name='Binlog_commits';
|
||||
select variable_value into @b2 from information_schema.global_status where variable_name='Binlog_group_commits';
|
||||
select variable_value into @b3 from information_schema.global_status where variable_name='Rocksdb_wal_synced';
|
||||
select IF(variable_value - @b1 = 10000, 'OK', 'FAIL') as Binlog_commits
|
||||
from information_schema.global_status where variable_name='Binlog_commits';
|
||||
Binlog_commits
|
||||
OK
|
||||
select IF(variable_value - @b2 < 8000, 'OK', 'FAIL') as Binlog_group_commits
|
||||
from information_schema.global_status where variable_name='Binlog_group_commits';
|
||||
Binlog_group_commits
|
||||
OK
|
||||
select IF(variable_value - @b3 < 10, 'OK', 'FAIL')
|
||||
from information_schema.global_status where variable_name='Rocksdb_wal_synced';
|
||||
IF(variable_value - @b3 < 10, 'OK', 'FAIL')
|
||||
OK
|
||||
SET GLOBAL rocksdb_enable_2pc= @save_rocksdb_enable_2pc;
|
||||
SET GLOBAL rocksdb_flush_log_at_trx_commit= @save_rocksdb_flush_log_at_trx_commit;
|
||||
DROP TABLE t1;
|
||||
DROP DATABASE mysqlslap;
|
||||
|
||||
@@ -12,53 +12,128 @@ CREATE DATABASE mysqlslap;
|
||||
USE mysqlslap;
|
||||
CREATE TABLE t1(id BIGINT AUTO_INCREMENT, value BIGINT, PRIMARY KEY(id)) ENGINE=rocksdb;
|
||||
|
||||
SET @save_rocksdb_enable_2pc= @@rocksdb_enable_2pc;
|
||||
SET @save_rocksdb_flush_log_at_trx_commit= @@rocksdb_flush_log_at_trx_commit;
|
||||
|
||||
#
|
||||
# In MariaDB, regular group commit operation does not cause increment of
|
||||
# rocksdb_wal_group_syncs.
|
||||
#
|
||||
|
||||
--echo # 2PC enabled, MyRocks durability enabled
|
||||
SET GLOBAL rocksdb_enable_2pc=1;
|
||||
SET GLOBAL rocksdb_flush_log_at_trx_commit=1;
|
||||
|
||||
--echo ##
|
||||
--echo ## 2PC + durability + single thread
|
||||
select variable_value into @c from information_schema.global_status where variable_name='rocksdb_wal_group_syncs';
|
||||
--echo ##
|
||||
select variable_value into @b1 from information_schema.global_status where variable_name='Binlog_commits';
|
||||
select variable_value into @b2 from information_schema.global_status where variable_name='Binlog_group_commits';
|
||||
select variable_value into @b3 from information_schema.global_status where variable_name='Rocksdb_wal_synced';
|
||||
--exec $MYSQL_SLAP --silent --concurrency=1 --number-of-queries=1000 --query="INSERT INTO t1 (id, value) VALUES(NULL, 1)"
|
||||
select case when variable_value-@c = 1000 then 'true' else 'false' end from information_schema.global_status where variable_name='rocksdb_wal_group_syncs';
|
||||
select IF(variable_value - @b1 = 1000, 'OK', 'FAIL') as Binlog_commits
|
||||
from information_schema.global_status where variable_name='Binlog_commits';
|
||||
select IF(variable_value - @b2 = 1000, 'OK', 'FAIL') as Binlog_group_commits
|
||||
from information_schema.global_status where variable_name='Binlog_group_commits';
|
||||
--echo # Prepare operations sync, commits don't. We expect slightly more than 1K syncs:
|
||||
select IF(variable_value - @b3 between 1000 and 1500, 'OK', 'FAIL') as Rocksdb_wal_synced
|
||||
from information_schema.global_status where variable_name='Rocksdb_wal_synced';
|
||||
|
||||
--echo ##
|
||||
--echo ## 2PC + durability + group commit
|
||||
select variable_value into @c from information_schema.global_status where variable_name='rocksdb_wal_group_syncs';
|
||||
--echo ##
|
||||
select variable_value into @b1 from information_schema.global_status where variable_name='Binlog_commits';
|
||||
select variable_value into @b2 from information_schema.global_status where variable_name='Binlog_group_commits';
|
||||
select variable_value into @b3 from information_schema.global_status where variable_name='Rocksdb_wal_synced';
|
||||
|
||||
--exec $MYSQL_SLAP --silent --concurrency=50 --number-of-queries=10000 --query="INSERT INTO t1 (id, value) VALUES(NULL, 1)"
|
||||
select case when variable_value-@c > 0 and variable_value-@c < 10000 then 'true' else 'false' end from information_schema.global_status where variable_name='rocksdb_wal_group_syncs';
|
||||
|
||||
select IF(variable_value - @b1 = 10000, 'OK', 'FAIL') as Binlog_commits
|
||||
from information_schema.global_status where variable_name='Binlog_commits';
|
||||
select IF(variable_value - @b2 between 100 and 5000, 'OK', 'FAIL') as Binlog_group_commits
|
||||
from information_schema.global_status where variable_name='Binlog_group_commits';
|
||||
select IF(variable_value - @b3 between 1 and 9000, 'OK', 'FAIL')
|
||||
from information_schema.global_status where variable_name='Rocksdb_wal_synced';
|
||||
|
||||
--echo # 2PC enabled, MyRocks durability disabled
|
||||
--echo ##
|
||||
--echo # 2PC enabled, MyRocks durability disabled, single thread
|
||||
--echo ##
|
||||
SET GLOBAL rocksdb_enable_2pc=1;
|
||||
SET GLOBAL rocksdb_flush_log_at_trx_commit=0;
|
||||
|
||||
select variable_value into @c from information_schema.global_status where variable_name='rocksdb_wal_group_syncs';
|
||||
select variable_value into @b1 from information_schema.global_status where variable_name='Binlog_commits';
|
||||
select variable_value into @b2 from information_schema.global_status where variable_name='Binlog_group_commits';
|
||||
select variable_value into @b3 from information_schema.global_status where variable_name='Rocksdb_wal_synced';
|
||||
--exec $MYSQL_SLAP --silent --concurrency=1 --number-of-queries=1000 --query="INSERT INTO t1 (id, value) VALUES(NULL, 1)"
|
||||
select case when variable_value-@c = 0 then 'true' else 'false' end from information_schema.global_status where variable_name='rocksdb_wal_group_syncs';
|
||||
|
||||
select variable_value into @c from information_schema.global_status where variable_name='rocksdb_wal_group_syncs';
|
||||
select IF(variable_value - @b1 = 1000, 'OK', 'FAIL') as Binlog_commits
|
||||
from information_schema.global_status where variable_name='Binlog_commits';
|
||||
select IF(variable_value - @b2 = 1000, 'OK', 'FAIL') as Binlog_group_commits
|
||||
from information_schema.global_status where variable_name='Binlog_group_commits';
|
||||
select IF(variable_value - @b3 < 10, 'OK', 'FAIL')
|
||||
from information_schema.global_status where variable_name='Rocksdb_wal_synced';
|
||||
|
||||
--echo ##
|
||||
--echo # 2PC enabled, MyRocks durability disabled, concurrent workload
|
||||
--echo ##
|
||||
|
||||
select variable_value into @b1 from information_schema.global_status where variable_name='Binlog_commits';
|
||||
select variable_value into @b2 from information_schema.global_status where variable_name='Binlog_group_commits';
|
||||
select variable_value into @b3 from information_schema.global_status where variable_name='Rocksdb_wal_synced';
|
||||
|
||||
--exec $MYSQL_SLAP --silent --concurrency=50 --number-of-queries=10000 --query="INSERT INTO t1 (id, value) VALUES(NULL, 1)"
|
||||
select case when variable_value-@c = 0 then 'true' else 'false' end from information_schema.global_status where variable_name='rocksdb_wal_group_syncs';
|
||||
|
||||
select IF(variable_value - @b1 = 10000, 'OK', 'FAIL') as Binlog_commits
|
||||
from information_schema.global_status where variable_name='Binlog_commits';
|
||||
select IF(variable_value - @b2 < 8000, 'OK', 'FAIL') as Binlog_group_commits
|
||||
from information_schema.global_status where variable_name='Binlog_group_commits';
|
||||
select IF(variable_value - @b3 < 10, 'OK', 'FAIL')
|
||||
from information_schema.global_status where variable_name='Rocksdb_wal_synced';
|
||||
|
||||
--echo # 2PC disabled, MyRocks durability enabled
|
||||
##
|
||||
## The next two are disabled because they don't add any test coverage in
|
||||
## MariaDB. @@rocksdb_enable_2pc=0 is a MyRocks-internal setting, binlog
|
||||
## [group] commit still happens, and syncing RocksDB WAL too.
|
||||
##
|
||||
|
||||
--disable_parsing
|
||||
--echo ##
|
||||
--echo # 2PC disabled, MyRocks durability enabled, one thread
|
||||
--echo ##
|
||||
SET GLOBAL rocksdb_enable_2pc=0;
|
||||
SET GLOBAL rocksdb_flush_log_at_trx_commit=1;
|
||||
|
||||
select variable_value into @c from information_schema.global_status where variable_name='rocksdb_wal_group_syncs';
|
||||
select variable_value into @b1 from information_schema.global_status where variable_name='Binlog_commits';
|
||||
select variable_value into @b2 from information_schema.global_status where variable_name='Binlog_group_commits';
|
||||
select variable_value into @b3 from information_schema.global_status where variable_name='Rocksdb_wal_synced';
|
||||
|
||||
--exec $MYSQL_SLAP --silent --concurrency=1 --number-of-queries=1000 --query="INSERT INTO t1 (id, value) VALUES(NULL, 1)"
|
||||
select case when variable_value-@c = 0 then 'true' else 'false' end from information_schema.global_status where variable_name='rocksdb_wal_group_syncs';
|
||||
|
||||
select variable_value into @c from information_schema.global_status where variable_name='rocksdb_wal_group_syncs';
|
||||
select variable_value - @b1 as Binlog_commits
|
||||
from information_schema.global_status where variable_name='Binlog_commits';
|
||||
select variable_value - @b2 as Binlog_group_commits
|
||||
from information_schema.global_status where variable_name='Binlog_group_commits';
|
||||
select variable_value - @b3 as Rocksdb_wal_synced
|
||||
from information_schema.global_status where variable_name='Rocksdb_wal_synced';
|
||||
|
||||
--echo ##
|
||||
--echo # 2PC disabled, MyRocks durability enabled, concurrent workload
|
||||
--echo ##
|
||||
select variable_value into @b1 from information_schema.global_status where variable_name='Binlog_commits';
|
||||
select variable_value into @b2 from information_schema.global_status where variable_name='Binlog_group_commits';
|
||||
select variable_value into @b3 from information_schema.global_status where variable_name='Rocksdb_wal_synced';
|
||||
--exec $MYSQL_SLAP --silent --concurrency=50 --number-of-queries=10000 --query="INSERT INTO t1 (id, value) VALUES(NULL, 1)"
|
||||
select case when variable_value-@c = 0 then 'true' else 'false' end from information_schema.global_status where variable_name='rocksdb_wal_group_syncs';
|
||||
|
||||
select variable_value - @b1 as Binlog_commits
|
||||
from information_schema.global_status where variable_name='Binlog_commits';
|
||||
select variable_value - @b2 as Binlog_group_commits
|
||||
from information_schema.global_status where variable_name='Binlog_group_commits';
|
||||
select variable_value - @b3 as Rocksdb_wal_synced
|
||||
from information_schema.global_status where variable_name='Rocksdb_wal_synced';
|
||||
--enable_parsing
|
||||
|
||||
SET GLOBAL rocksdb_enable_2pc= @save_rocksdb_enable_2pc;
|
||||
SET GLOBAL rocksdb_flush_log_at_trx_commit= @save_rocksdb_flush_log_at_trx_commit;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
SET GLOBAL rocksdb_enable_2pc=1;
|
||||
SET GLOBAL rocksdb_flush_log_at_trx_commit=1;
|
||||
DROP TABLE t1;
|
||||
DROP DATABASE mysqlslap;
|
||||
|
||||
@@ -40,7 +40,6 @@ read_only_tx : MariaRocks: requires GTIDs
|
||||
rpl_row_triggers : MariaRocks: requires GTIDs
|
||||
|
||||
trx_info_rpl : MariaRocks: @@rpl_skip_tx_api doesn't work, yet.
|
||||
2pc_group_commit : MariaRocks: Group Commit is not functional yet
|
||||
|
||||
mysqldump : MariaRocks: MariaDB's mysqldump doesn't support --print-ordering-key
|
||||
mysqldump2 : MariaRocks: MariaDB's mysqldump doesn't support --print-ordering-key
|
||||
|
||||
Reference in New Issue
Block a user