Skip to content

Commit

Permalink
Make rocksdb.use_direct_reads_writes more robust
Browse files Browse the repository at this point in the history
Upstream commit ID : None
PS-7921 : Merge percona-202105

Summary:

Use an exclusive name for the log error file so concurrent executions of
the test don't try to use the same file.
  • Loading branch information
Luis Donoso committed Oct 28, 2021
1 parent 8a4193a commit c2812a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions mysql-test/suite/rocksdb/r/use_direct_reads_writes.result
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# restart:--log-error=MYSQLTEST_VARDIR/tmp/rocksdb.use_direct_reads_writes.err --rocksdb_use_direct_reads=1 --rocksdb_allow_mmap_reads=1
# restart:--log-error=LOG_ERROR_FILE --rocksdb_use_direct_reads=1 --rocksdb_allow_mmap_reads=1
Pattern "enable both use_direct_reads" found
# restart:--log-error=MYSQLTEST_VARDIR/tmp/rocksdb.use_direct_reads_writes.err --rocksdb_use_direct_io_for_flush_and_compaction=1 --rocksdb_allow_mmap_writes=1
# restart:--log-error=LOG_ERROR_FILE --rocksdb_use_direct_io_for_flush_and_compaction=1 --rocksdb_allow_mmap_writes=1
Pattern "enable both use_direct_io_for_flush_and_compaction" found
# restart
7 changes: 4 additions & 3 deletions mysql-test/suite/rocksdb/t/use_direct_reads_writes.test
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
# caused an assertion in RocksDB. Now it should not be allowed and the
# plugin will not initialize with that configuration

--let SEARCH_FILE=$MYSQLTEST_VARDIR/tmp/rocksdb.use_direct_reads_writes.err
--let $FILE_ID = `SELECT uuid()`
--let SEARCH_FILE=$MYSQLTEST_VARDIR/tmp/rocksdb.use_direct_reads_writes_$FILE_ID.err

# Expect MyRocks to fail to initialize with invalid combination of arguments
--let $restart_parameters=restart:--log-error=$SEARCH_FILE --rocksdb_use_direct_reads=1 --rocksdb_allow_mmap_reads=1
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--replace_result $SEARCH_FILE LOG_ERROR_FILE
--source include/restart_mysqld.inc

# We should now have an error message
Expand All @@ -19,7 +20,7 @@

# Repeat with --rocksdb-use-direct-writes
--let $restart_parameters=restart:--log-error=$SEARCH_FILE --rocksdb_use_direct_io_for_flush_and_compaction=1 --rocksdb_allow_mmap_writes=1
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--replace_result $SEARCH_FILE LOG_ERROR_FILE
--source include/restart_mysqld.inc

# We should now have an error message
Expand Down

0 comments on commit c2812a2

Please sign in to comment.