Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mirror_hostgroup in mysql query rules is being swapped with mirror_flagOUT #4867

Closed
altmannmarcelo opened this issue Mar 11, 2025 · 2 comments · Fixed by #4872
Closed

mirror_hostgroup in mysql query rules is being swapped with mirror_flagOUT #4867

altmannmarcelo opened this issue Mar 11, 2025 · 2 comments · Fixed by #4872
Assignees
Milestone

Comments

@altmannmarcelo
Copy link

I am using proxysql 3.0 compiled from commit 4c7558889c2167b9f48b1a5a10694ad2e08f5738 (HEAD -> v3.0, origin/v3.0, origin/HEAD)

When I create a query rule with mirror hostgroup, this gets swapped to mirror_flagOUT on runtime table:

mysql> SELECT * FROM mysql_query_rules\G
*************************** 1. row ***************************
              rule_id: 2
               active: 1
             username: root
           schemaname: NULL
               flagIN: 0
          client_addr: NULL
           proxy_addr: NULL
           proxy_port: NULL
               digest: 0x9AC4D666A49ABB96
         match_digest: NULL
        match_pattern: NULL
 negate_match_pattern: 0
         re_modifiers: CASELESS
              flagOUT: NULL
      replace_pattern: NULL
destination_hostgroup: NULL
            cache_ttl: NULL
   cache_empty_result: NULL
        cache_timeout: NULL
            reconnect: NULL
              timeout: NULL
              retries: NULL
                delay: NULL
    next_query_flagIN: NULL
       mirror_flagOUT: NULL
     mirror_hostgroup: 2
            error_msg: NULL
               OK_msg: NULL
          sticky_conn: NULL
            multiplex: NULL
  gtid_from_hostgroup: NULL
                  log: NULL
                apply: 1
           attributes:
              comment: Mirror by readyset scheduler at: 2025-03-11 17:46:23
1 row in set (0.00 sec)

mysql> SELECT * FROM runtime_mysql_query_rules\G
*************************** 1. row ***************************
              rule_id: 2
               active: 1
             username: root
           schemaname: NULL
               flagIN: 0
          client_addr: NULL
           proxy_addr: NULL
           proxy_port: NULL
               digest: 0x9AC4D666A49ABB96
         match_digest: NULL
        match_pattern: NULL
 negate_match_pattern: 0
         re_modifiers: CASELESS
              flagOUT: NULL
      replace_pattern: NULL
destination_hostgroup: NULL
            cache_ttl: NULL
   cache_empty_result: NULL
        cache_timeout: NULL
            reconnect: NULL
              timeout: NULL
              retries: NULL
                delay: NULL
    next_query_flagIN: NULL
       mirror_flagOUT: 2
     mirror_hostgroup: NULL
            error_msg: NULL
               OK_msg: NULL
          sticky_conn: NULL
            multiplex: NULL
  gtid_from_hostgroup: NULL
                  log: NULL
                apply: 1
           attributes:
              comment: Mirror by readyset scheduler at: 2025-03-11 17:46:23
1 row in set (0.00 sec)
@renecannao renecannao added this to the 2025-04 milestone Mar 12, 2025
@renecannao
Copy link
Contributor

Thank you @altmannmarcelo for the report.

Assigning to @yashwantsahu20 for further investigation

@rahim-kanji
Copy link
Collaborator

Hi @altmannmarcelo ,

Good catch! This has been fixed in PR#4872 and will be available in a future release. Appreciate your input!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants