Skip to content

Make the mtr test script compatible with the new gflags system #148

Closed

Description

@liunyl

Test Summary

eloqsql mtr test option input system needs to be refactored as we no longer support mysql options from command line.

Activity

  1. self-assigned this
    on Oct 27, 2025
  2. liunyl commented on Oct 27, 2025

    @liunyl
    ContributorAuthor

    Input prompt for plan:

    In order to keep mariadb_test-run.pl compatible with the new gflags cmd arg system, we need to make some adjustments.
    NOTE: the thoughts below are based on my resarch, please do your own research to see if the plan works and if there's any thing missing.

    1. EloqSql no longer takes the original mysql command line args. It only takes glfags defined in data substrate. So we need to replace the options passed to mysqld in mtr. There are a few options:1. Put them into config file. 2. If for multi node case, we need to pass in different value, for example default-group-suffix, we can define the gflag in mysqld when code is built in debug mode and pass it to mysqld so that it can still consume the value.
    2. EloqSql now takes mysql related config from eloqsql_config flag, and data substrate related config from config flag. So mtr need to pass in an extra config file. mtr should seek config file location just like it did with searching mysql config file. It should follow the priority like this 1. {test_name}_data_substrate.cnf 2. suite level config with name data_substrate.cnf.
    3. See the test conf in mono_multi dir, we used to pass in data substrate params like eloq_local_ip and eloq_metrics_port in mysql config with different group suffix. Now that it is moved to data substrate config, and we do not want to create 3 separate config files for a 3 node cluster, so we need to find a way to get around these configs. eloq_local_ip is separated into tx_ip and tx_port. tx_ip is the same for test cluster nodes, tx_port is different though, pass them in from cmd line, just like default-group-suffix. You can default it too group_suffix * 1000 and pass it in. For metrics port, just disable metrics in the shared data substrate file so that we do not need to worry about it.

    In the end, the success criteria is mono_basic test cases can be run successfully. you can run mtr with command format below

    /home/ubuntu/workspace/eloqsql/bld/mysql-test/mtr  --suite=mono_basic --force --bootstrap-defaults-file=/path/to/eloqsql/cnf --bootstrap-data-substrate=/path/to/ds/cnf
    
  3. liunyl commented on Oct 29, 2025

    @liunyl
    ContributorAuthor

    Tried to modify test script to make it compatible with gflags system but didn't work.
    New plan is to make mysqld backward compatible when built alone as a binary.
    When built as a library, it will still only accept gflags defined flags.

  4. liunyl commented on Nov 17, 2025

    @liunyl
    ContributorAuthor

    Made new eloqsql backward compatible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions