Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-23168

Implement SESSION_TRACK_GTIDS exactly

Details

    Description

      This issue was previously marked as a duplicate and it was opted to use last_gtid instead I believe. However this causes compatibility issues with ProxySQL for instance, which uses SESSION_TRACK_GTIDS to support causal reads as described here: https://proxysql.com/blog/proxysql-gtid-causal-reads/.

      It might prevent someone from migrating from MySQL to MariaDB and cause the reverse instead.

      Attachments

        Issue Links

          Activity

            would that help? MariaDB gtids are different from MySQL, so proxysql MySQL-specific causal reads might not work on MariaDB with or without SESSION_TRACK_GTIDS

            serg Sergei Golubchik added a comment - would that help? MariaDB gtids are different from MySQL, so proxysql MySQL-specific causal reads might not work on MariaDB with or without SESSION_TRACK_GTIDS
            jgerry2002 Justin Gerry added a comment - - edited

            So what would be the proper implementation? I am having this same problem I can't implement MySQL specific casual reads because Proxysql expects session_track_gtids to exist on Mariadb. I've had to take read/write users and pin them to the same group which negates any possible performance advantage. If I switch to Percona/Oracle then this problem would be solvable.

            I've seen numerous tickets opened about this issue but there does not appear to be a clear implementation path. I just recently asked for clarification and was told it does support this mechanism in this ticket: CONC-302 but perhaps not in the same way?

            However it does not appear to work as its still missing support for the actual variable/parameter. I've noted my findings here: https://github.com/sysown/proxysql/issues/3059

            To summerize I see "Unknown system variable 'SESSION_TRACK_GTIDS'" since MariaDB does not have the actual variable.

            I'm assuming Proxysql would have to alter the implementation since it expects session_track_gtids to actually exist on the backend MariaDB server.

            However it does appear that the OK packet does contain the GTID. https://mariadb.com/kb/en/ok_packet/

            Can you offer any suggestions on a way to offer some compatibility? I would assume proxysql would have to alter its implementation and actually attempt to get GTID from that returned packet?

            For more background, here is a good way to test implementation of MySQL casual reads: https://github.com/sysown/proxysql/issues/2022

            jgerry2002 Justin Gerry added a comment - - edited So what would be the proper implementation? I am having this same problem I can't implement MySQL specific casual reads because Proxysql expects session_track_gtids to exist on Mariadb. I've had to take read/write users and pin them to the same group which negates any possible performance advantage. If I switch to Percona/Oracle then this problem would be solvable. I've seen numerous tickets opened about this issue but there does not appear to be a clear implementation path. I just recently asked for clarification and was told it does support this mechanism in this ticket: CONC-302 but perhaps not in the same way? However it does not appear to work as its still missing support for the actual variable/parameter. I've noted my findings here: https://github.com/sysown/proxysql/issues/3059 To summerize I see "Unknown system variable 'SESSION_TRACK_GTIDS'" since MariaDB does not have the actual variable. I'm assuming Proxysql would have to alter the implementation since it expects session_track_gtids to actually exist on the backend MariaDB server. However it does appear that the OK packet does contain the GTID. https://mariadb.com/kb/en/ok_packet/ Can you offer any suggestions on a way to offer some compatibility? I would assume proxysql would have to alter its implementation and actually attempt to get GTID from that returned packet? For more background, here is a good way to test implementation of MySQL casual reads: https://github.com/sysown/proxysql/issues/2022

            Thanks jgerry2002. It seems that ProxySQL might not care that MariaDB gtids are different, if it will just compare them as strings.
            rcannao would, of course, know for sure.

            I'll reopen this as a feature request.

            serg Sergei Golubchik added a comment - Thanks jgerry2002 . It seems that ProxySQL might not care that MariaDB gtids are different, if it will just compare them as strings. rcannao would, of course, know for sure. I'll reopen this as a feature request.
            jgerry2002 Justin Gerry added a comment -

            Very much appreciated as there does seem to be conversation regarding this. Hopefully we can get some traction on this since there is support in the OK packet, it just may need some modifications on the ProxSQL side of things.

            jgerry2002 Justin Gerry added a comment - Very much appreciated as there does seem to be conversation regarding this. Hopefully we can get some traction on this since there is support in the OK packet, it just may need some modifications on the ProxSQL side of things.
            jgerry2002 Justin Gerry added a comment -

            @René Cannaò - any comments on this? Seems this implementation is very close to fully functioning if you could provide some comments.

            jgerry2002 Justin Gerry added a comment - @René Cannaò - any comments on this? Seems this implementation is very close to fully functioning if you could provide some comments.
            danblack Daniel Black added a comment -

            [ProxySQL provided PR on MariaDB compatibility (not merged) is reformatting the gtid to a MariaDB syntax. Reasoning unclear as the WAIT_FOR_EXECUTED_GTID_SET or MariaDB MASTER_GTID_WAIT would need to be in the application still?

            danblack Daniel Black added a comment - [ProxySQL provided PR on MariaDB compatibility (not merged) is reformatting the gtid to a MariaDB syntax. Reasoning unclear as the WAIT_FOR_EXECUTED_GTID_SET or MariaDB MASTER_GTID_WAIT would need to be in the application still?

            People

              Unassigned Unassigned
              mac89 Maarten Manders
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.