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

fix: change type from int to float for heartbeat period #70

Merged
merged 1 commit into from
Sep 12, 2020
Merged

fix: change type from int to float for heartbeat period #70

merged 1 commit into from
Sep 12, 2020

Conversation

misaert
Copy link
Contributor

@misaert misaert commented Sep 11, 2020

According to the MySQL documentation, the heartbeat period configuration permits to have a float type:

The heartbeat interval interval is a decimal value having the range 0 to 4294967 seconds and a resolution in milliseconds; the smallest nonzero value is 0.001.

@krowinski
Copy link
Owner

krowinski commented Sep 11, 2020

tx for mr

Yes when I read documentation I seen this as float but I didn't see any real life case when you need this higher seconds

Do you have any case that need this ?

also there is

       if (0 !== Config::getHeartbeatPeriod()) {
            // master_heartbeat_period is in nanoseconds
            $this->execute('SET @master_heartbeat_period = ' . Config::getHeartbeatPeriod() * 1000000000);
        }

@misaert
Copy link
Contributor Author

misaert commented Sep 11, 2020

In fact, I need to define the heartbeat period to 0.001 to accelerate my feature test. It permits to finish it to 0.20s instead 1.15s.

Are you ok to change it?

@krowinski
Copy link
Owner

ok

@krowinski krowinski merged commit d0828c5 into krowinski:master Sep 12, 2020
@misaert
Copy link
Contributor Author

misaert commented Sep 12, 2020

Thanks. And I want to say you have done a great work with this package 👍

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

Successfully merging this pull request may close these issues.

2 participants