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

Slave_heartbeat_period is imprecise

    XMLWordPrintable

Details

    Description

      When reviewing code, I discovered that Master_info::heartbeat_period is a float.
      Yes, the 0.1 * 3 != 0.3 kind of float.

      Modding MTR test rpl.rpl_heartbeat_basic, I can confirm that it indeed only supports 7 decimal digits:

      • 4294966.999 shows up as 4294967.000 in both SHOW STATUS and SHOW REPLICA STATUS.
      • 4294967.001 does not trigger the “4294967 exceeded” error (whereas “4294967.999” does).

      The test (with the expected .result, not actual): https://github.com/MariaDB/server/compare/10.5...mdev-35879.test

      This variable should be a double for enough precision or, better, a DECIMAL(10, 3) (or internally stored as a uint32_t of milliseconds).

      Attachments

        Issue Links

          Activity

            People

              ParadoxV5 Jimmy Hú
              ParadoxV5 Jimmy Hú
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.