Skip to content

Commit

Permalink
Fix more tests - #9
Browse files Browse the repository at this point in the history
Summary:
1. Disable group_min_max: we need to port over infinite loop fix
2. Disable blind_delete_rc/blind_delete_rr - missing rocksdb_read_free_rpl patch
3. Disable rocksdb.persistent_cache - this is a strange crash that only happens when other tests are running and requires further investigation
4. Lower number of rows in deadlock/drop_table as 8.0 debug can lead to timeout. Filed a task to investigate why the performance is different between 8.0 and 5.6. Also turn off binlog to make the test slightly faster and align with 5.6
5. rocksdb.information_schema: need to move create table before select * from information_schema.rocksdb_global_info to write out max_index. Also due to missing a few tables in mysql database (such as slave_gtid_info, etc) the index ids are also different.
6. rocksdb.rocksdb: account for different in rocksdb_number_keys_written when binlog is enabled by default in 8.0. Disabled partition related tests with disable_testcase (tracked in a separate task). Also disabled a packing related test that is tracked by a separate task.
7. rocksdb.drop_table: reduce max to avoid test timeout (filed a separate task for investigation). Also fix a bug in myrocksdb shutdown to properly abort the compaction at shutdown when rocksdb_Debug_manual_compaction_delay is set.
8. rebaseline rpl_gtid_crash_safe because the .inc file in mysql side has changed

Reviewed By: lloyd

Differential Revision: D17802248
  • Loading branch information
yizhang82 authored and inikep committed May 27, 2023
1 parent 075e7d6 commit a0d052b
Show file tree
Hide file tree
Showing 17 changed files with 620 additions and 500 deletions.
4 changes: 4 additions & 0 deletions mysql-test/collections/disabled_rocksdb.def
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ rocksdb_rpl.rpl_no_unique_check_on_lag_mts : missing d80175902ee Disable unique
rocksdb.percona_nonflushing_analyze_debug : missing dbc7c09e252 Fix bug 1704195 / 87065 / TDB-83 (Stop ANALYZE TABLE from flushing table definition cache)
rocksdb.2pc_group_commit : missing 37c7ed00ce9 write/sync redo log before flushing binlog cache to file
rocksdb.slow_query_log : missing 91d708f9efb Add support for reporting keys/deletes skipped in the extra slow query log
rocksdb.group_min_max : missing infinite loop fix

# Blind replace
rocksdb.optimize_myrocks_replace_into_base : missing patch f14c64cf950 Optimize replace into to do a blind write
Expand All @@ -76,6 +77,8 @@ rocksdb_rpl.rpl_skip_trx_api_binlog_format : rpl_skip_tx_api missing
# rocksdb_read_free_rpl
rocksdb.rocksdb_read_free_rpl : rocksdb_read_free_rpl missing
rocksdb.rocksdb_read_free_rpl_stress : rocksdb_read_free_rpl missing
rocksdb.blind_delete_rc : rocksdb_read_free_rpl missing
rocksdb.blind_delete_rr : rocksdb_read_free_rpl missing

# i_s.table_statistics
rocksdb.show_table_status : table_statistics missing
Expand All @@ -94,4 +97,5 @@ rocksdb.com_rpc_tx : detached session is missing in 8.0
# Misc bugs
rocksdb.bloomfilter3 : query plan is different between 8.0 and 5.6
rocksdb.issue884 : query plan is different between 8.0 and 5.6
rocksdb.persistent_cache : only repros with other tests running

16 changes: 8 additions & 8 deletions mysql-test/suite/rocksdb/r/deadlock.result
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,27 @@ SET @save = @@global.rocksdb_lock_wait_timeout;
SET GLOBAL rocksdb_lock_wait_timeout = 60;
SELECT count from t1;
count
50000
5000
SELECT count from t1;
count
100000
10000
SELECT count from t1;
count
150000
15000
SELECT count from t1;
count
200000
20000
SELECT count from t1rev;
count
50000
5000
SELECT count from t1rev;
count
100000
10000
SELECT count from t1rev;
count
150000
15000
SELECT count from t1rev;
count
200000
20000
SET GLOBAL rocksdb_lock_wait_timeout = @save;
DROP DATABASE mysqlslap;
8 changes: 6 additions & 2 deletions mysql-test/suite/rocksdb/r/drop_table.result
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ call mtr.add_suppression("LibRocksDB");
set global rocksdb_compact_cf = 'cf1';
set global rocksdb_compact_cf = 'rev:cf2';
set global rocksdb_signal_drop_index_thread = 1;
# restart
CREATE TABLE t1 (
a int not null,
b int not null,
Expand Down Expand Up @@ -38,6 +39,7 @@ DELETE FROM t2;
DELETE FROM t3;
DELETE FROM t4;
drop table t2;
# restart
DELETE FROM t1;
DELETE FROM t4;
drop table t3;
Expand All @@ -47,14 +49,16 @@ SET GLOBAL rocksdb_max_manual_compactions = 2;
SET GLOBAL rocksdb_debug_manual_compaction_delay = 3600;
SET GLOBAL rocksdb_compact_cf='cf1';
SET GLOBAL rocksdb_compact_cf='rev:cf2';
select * from information_schema.global_status where variable_name='rocksdb_manual_compactions_running';
select * from performance_schema.global_status where variable_name='rocksdb_manual_compactions_running';
VARIABLE_NAME VARIABLE_VALUE
ROCKSDB_MANUAL_COMPACTIONS_RUNNING 1
rocksdb_manual_compactions_running 1
SET GLOBAL rocksdb_compact_cf='cf1';
ERROR HY000: Internal error: Can't schedule more manual compactions. Increase rocksdb_max_manual_compactions or stop issuing more manual compactions.
SET GLOBAL rocksdb_compact_cf='rev:cf2';
ERROR HY000: Internal error: Can't schedule more manual compactions. Increase rocksdb_max_manual_compactions or stop issuing more manual compactions.
# restart
drop table t4;
# restart
CREATE TABLE t5 (
a int not null,
b int not null,
Expand Down
12 changes: 6 additions & 6 deletions mysql-test/suite/rocksdb/r/information_schema.result
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
DROP TABLE IF EXISTS t3;
select VALUE into @keysIn from INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS where CF_NAME = 'default' and LEVEL = 'Sum' and TYPE = 'KeyIn';
CREATE TABLE t1 (i1 INT, i2 INT, PRIMARY KEY (i1)) ENGINE = ROCKSDB;
INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3);
select * from INFORMATION_SCHEMA.ROCKSDB_GLOBAL_INFO;
TYPE NAME VALUE
MAX_INDEX_ID MAX_INDEX_ID max_index_id
Expand All @@ -9,14 +12,11 @@ CF_FLAGS 1 __system__ [0]
select count(*) from INFORMATION_SCHEMA.ROCKSDB_GLOBAL_INFO;
count(*)
3
select VALUE into @keysIn from INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS where CF_NAME = 'default' and LEVEL = 'Sum' and TYPE = 'KeyIn';
CREATE TABLE t1 (i1 INT, i2 INT, PRIMARY KEY (i1)) ENGINE = ROCKSDB;
INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3);
set global rocksdb_force_flush_memtable_now = true;
select * from INFORMATION_SCHEMA.ROCKSDB_GLOBAL_INFO;
TYPE NAME VALUE
BINLOG FILE master-bin.000001
BINLOG POS 1066
BINLOG FILE binlog.000001
BINLOG POS 1278
BINLOG GTID uuid:5
MAX_INDEX_ID MAX_INDEX_ID max_index_id
CF_FLAGS 0 default [0]
Expand Down Expand Up @@ -67,7 +67,7 @@ SHOW GLOBAL VARIABLES LIKE 'ROCKSDB_PAUSE_BACKGROUND_WORK';
Variable_name Value
rocksdb_pause_background_work ON
DROP TABLE t3;
cf_id:0,index_id:267
cf_id:0,index_id:263
SET GLOBAL ROCKSDB_PAUSE_BACKGROUND_WORK=0;
SHOW GLOBAL VARIABLES LIKE 'ROCKSDB_PAUSE_BACKGROUND_WORK';
Variable_name Value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,78 +4,83 @@ set SESSION binlog_format = 'ROW';
create database test2;
create database test3;
use test;
create table t1 (a int primary key, b char(8)) ENGINE=rocksdb;
create table t1(a int primary key, b char(8)) ENGINE = rocksdb;
insert into t1 values(1, 'a');
insert into t1 values(2, 'b');
create table t2 (a int primary key, b char(8)) ENGINE=rocksdb;
create table t2(a int primary key, b char(8)) ENGINE = rocksdb;
start transaction;
insert into t2 values(1, 'a');
insert into t2 values(2, 'b');
insert into t2 values(3, 'c');
insert into t2 values(4, 'd');
commit;
use test2;
create table t1 (a int primary key, b char(8)) ENGINE=rocksdb;
create table t1(a int primary key, b char(8)) ENGINE = rocksdb;
insert into t1 values(1, 'a');
insert into t1 values(2, 'b');
create table t2 (a int primary key, b char(8)) ENGINE=rocksdb;
create table t2(a int primary key, b char(8)) ENGINE = rocksdb;
start transaction;
insert into t2 values(1, 'a');
insert into t2 values(2, 'b');
insert into t2 values(3, 'c');
insert into t2 values(4, 'd');
commit;
use test3;
create table t1 (a int primary key, b char(8)) ENGINE=rocksdb;
create table t1(a int primary key, b char(8)) ENGINE = rocksdb;
insert into t1 values(1, 'a');
insert into t1 values(2, 'b');
create table t2 (a int primary key, b char(8)) ENGINE=rocksdb;
create table t2(a int primary key, b char(8)) ENGINE = rocksdb;
start transaction;
insert into t2 values(1, 'a');
insert into t2 values(2, 'b');
insert into t2 values(3, 'c');
insert into t2 values(4, 'd');
commit;
FLUSH LOGS;
==== Output of mysqlbinlog with --short-form --skip-empty-trans, --database and --skip-gtids options ====
include/mysqlbinlog.inc
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
ROLLBACK/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET TIMESTAMP=#/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=1073741824/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
/*!\C utf8mb4 *//*!*/;
SET @@session.character_set_client=255,@@session.collation_connection=255,@@session.collation_server=8/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
/*!80011 SET @@session.default_collation_for_utf8mb4=255*//*!*/;
/*!80013 SET @@session.sql_require_primary_key=0*//*!*/;
create database test2
/*!*/;
use `test2`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
create table t1 (a int primary key, b char(8)) ENGINE=rocksdb
SET TIMESTAMP=#/*!*/;
/*!80013 SET @@session.sql_require_primary_key=0*//*!*/;
create table t1(a int primary key, b char(8)) ENGINE = rocksdb
/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET TIMESTAMP=#/*!*/;
/*!80013 SET @@session.sql_require_primary_key=0*//*!*/;
BEGIN
/*!*/;
COMMIT/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET TIMESTAMP=#/*!*/;
/*!80013 SET @@session.sql_require_primary_key=0*//*!*/;
BEGIN
/*!*/;
COMMIT/*!*/;
SET TIMESTAMP=1000000000/*!*/;
create table t2 (a int primary key, b char(8)) ENGINE=rocksdb
SET TIMESTAMP=#/*!*/;
/*!80013 SET @@session.sql_require_primary_key=0*//*!*/;
create table t2(a int primary key, b char(8)) ENGINE = rocksdb
/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET TIMESTAMP=#/*!*/;
/*!80013 SET @@session.sql_require_primary_key=0*//*!*/;
BEGIN
/*!*/;
COMMIT/*!*/;
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
use test2;
Expand All @@ -87,26 +92,26 @@ insert into t2 values(7, 'g');
insert into t2 values(8, 'h');
commit;
FLUSH LOGS;
==== Output of mysqlbinlog with --short-form --skip-empty-trans, --database and --skip-gtids options ====
==== DB changed in the middle of the transaction, which belongs to the selected database
include/mysqlbinlog.inc
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET TIMESTAMP=#/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=1073741824/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
/*!\C utf8mb4 *//*!*/;
SET @@session.character_set_client=255,@@session.collation_connection=255,@@session.collation_server=8/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
/*!80011 SET @@session.default_collation_for_utf8mb4=255*//*!*/;
/*!80013 SET @@session.sql_require_primary_key=0*//*!*/;
BEGIN
/*!*/;
ROLLBACK /* added by mysqlbinlog */ /*!*/;
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
use test;
Expand All @@ -118,15 +123,13 @@ insert into t2 values(11, 'k');
insert into t2 values(12, 'l');
commit;
FLUSH LOGS;
==== Output of mysqlbinlog with --short-form --skip-empty-trans, --database and --skip-gtids options ====
==== DB changed in the middle of the transaction, which belongs to the non-selected database
include/mysqlbinlog.inc
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
ROLLBACK /* added by mysqlbinlog */ /*!*/;
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
use test;
Expand Down
10 changes: 5 additions & 5 deletions mysql-test/suite/rocksdb/r/read_only_tx.result
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (id INT, value int, PRIMARY KEY (id), INDEX (value)) ENGINE=RocksDB;
INSERT INTO t1 VALUES (1,1);
select variable_value into @p from information_schema.global_status where variable_name='rocksdb_number_sst_entry_put';
select variable_value into @s from information_schema.global_status where variable_name='rocksdb_number_sst_entry_singledelete';
select variable_value into @p from performance_schema.global_status where variable_name='rocksdb_number_sst_entry_put';
select variable_value into @s from performance_schema.global_status where variable_name='rocksdb_number_sst_entry_singledelete';
START TRANSACTION WITH CONSISTENT ROCKSDB SNAPSHOT;
File Position Gtid_executed
master-bin.000001 734 uuid:1-3
select case when variable_value-@p < 1000 then 'true' else variable_value-@p end from information_schema.global_status where variable_name='rocksdb_number_sst_entry_put';
binlog.000001 870 uuid:1-3
select case when variable_value-@p < 1000 then 'true' else variable_value-@p end from performance_schema.global_status where variable_name='rocksdb_number_sst_entry_put';
case when variable_value-@p < 1000 then 'true' else variable_value-@p end
true
select case when variable_value-@s < 100 then 'true' else variable_value-@s end from information_schema.global_status where variable_name='rocksdb_number_sst_entry_singledelete';
select case when variable_value-@s < 100 then 'true' else variable_value-@s end from performance_schema.global_status where variable_name='rocksdb_number_sst_entry_singledelete';
case when variable_value-@s < 100 then 'true' else variable_value-@s end
true
SELECT * FROM t1;
Expand Down
Loading

0 comments on commit a0d052b

Please sign in to comment.