Skip to content

MDEV-41212: multi_source.status_vars fails on MacOS platform - #5703

Open
DaveGosselin-MariaDB wants to merge 1 commit into
11.4from
11.4-mdev-4121-status-vars-mac
Open

DaveGosselin-MariaDB wants to merge 1 commit into
11.4from
11.4-mdev-4121-status-vars-mac

Conversation

@DaveGosselin-MariaDB

Copy link
Copy Markdown
Member

Replace the two recorded reads of Slave_received_heartbeats with an assertion that the counter is nonzero.

The counter advances once per heartbeat period for as long as the connection is running. The test waited for it to reach 2 and then read it again in a separate query, so a heartbeat arriving between those two queries recorded an unexpected value.

Replace the two recorded reads of Slave_received_heartbeats with an
assertion that the counter is nonzero.

The counter advances once per heartbeat period for as long as the
connection is running.  The test waited for it to reach 2 and then
read it again in a separate query, so a heartbeat arriving between
those two queries recorded an unexpected value.
# The units are tens of seconds
--let $status_timeout = 30
--source include/wait_for_status_var.inc
show status like 'Slave_received_heartbeats';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will only fix the first problem reported in MDEV-41212 (the mismatch), but not the second one, dying while waiting:

mysqltest: In included file "./include/wait_for_status_var.inc": 
included from /Users/ec2-user/buildbot/prod/aarch64-macos/build/mysql-test/suite/multi_source/status_vars.test at line 75:
At line 88: Explicit --die command executed

In this case it fails on the previous line, apparently because by the time the wait for "2" starts, there are already at least 3 heartbeats in the status variable, so it keeps waiting, hits the timeout, and dies -- never reaching the showdown query.

--let $status_var_value = 1
--let $status_timeout = 30
--source include/wait_for_status_var.inc
show status like 'Slave_received_heartbeats';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like it never fails here on whatever reason, but i suppose it's good to make it stable here anyway. However, then it also makes sense to address the same (although in this case hypothetical) problem as we have in the earlier part, that it might fail in wait_for_status_var wait if by the time it starts waiting there are already 2+ heartbeats.

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

Development

Successfully merging this pull request may close these issues.

2 participants