Uploaded image for project: 'Percona Server'
  1. Percona Server
  2. PS-4529

MTR: index_merge_rocksdb2 inadvertently tests InnoDB instead of MyRocks

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Pending Release
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 8.0.12-2rc1, 5.7.21-21, 5.6.41-84.1
    • Fix Version/s: 5.6.42-84.2, 8.0.NEXT, 5.7.24-26
    • Component/s: None
    • Labels:

      Description

      The rocksdb.index_merge_rocksdb2 MTR test inadvertently runs some of its queries against InnoDB tables rather than MyRocks. Which results from a combination of 2 things:

      • the way the test is implemented by Facebook is setting the engine_type variable, then including a number of include/index_merge*.inc files. All of which do "SET SESSION DEFAULT_STORAGE_ENGINE = $engine_type" so that the specified engine is used when the tables are later created without an explicit storage engine specification;
      • and then there are Percona-specific changes to those include/index_merge*.inc files introduced by https://github.com/percona/percona-server/commit/35afd73da3ca. Which restart the server at certain points in time, thus resetting the default storage engine set earlier by the test. Which also means all further tables in the test are created with the default-default storage engine, i.e. InnoDB.

      Here's an easy way to verify. Apply the following patch and run ./mtr rocksdb.index_merge_rocksdb2 --big-test:

      diff --git a/mysql-test/include/index_merge1.inc b/mysql-test/include/index_merge1.inc
      --- a/mysql-test/include/index_merge1.inc
      +++ b/mysql-test/include/index_merge1.inc
      @@ -648,6 +648,9 @@ while ($1)
      
       --enable_query_log
      
      +select @@session.default_storage_engine;
      +SHOW CREATE TABLE t1;
      +
       OPTIMIZE TABLE t1;
       select count(*) from t1;
      

      This is what I see in the output on the latest Percona Server clone:

      +select @@session.default_storage_engine;
      +@@session.default_storage_engine
      +InnoDB
      +SHOW CREATE TABLE t1;
      +Table	Create Table
      +t1	CREATE TABLE `t1` (
      +  `cola` char(3) NOT NULL,
      +  `colb` char(3) NOT NULL,
      +  `filler` char(200) DEFAULT NULL,
      +  KEY `cola` (`cola`),
      +  KEY `colb` (`colb`)
      +) ENGINE=InnoDB DEFAULT CHARSET=latin1
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                george.lorch George Lorch
                Reporter:
                akopytov Alexey Kopytov
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 hours, 15 minutes
                  3h 15m