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

printStatus causes a divide by zero error #1117

Closed
ethankhall opened this issue Apr 13, 2022 · 1 comment · Fixed by #1140
Closed

printStatus causes a divide by zero error #1117

ethankhall opened this issue Apr 13, 2022 · 1 comment · Fixed by #1140

Comments

@ethankhall
Copy link

We're using gh-ost as a library, and testing 8f361f6
I noticed that our test suite fails with

Unhandled error
panic: runtime error: integer divide by zero
Location
github.com/github/gh-ost/go/logic/migrator.go:1019 - (*Migrator).printStatus

It looks like when fbb53f4
was introduced if HooksStatusIntervalSec is set to 0, this panic will happen.

@ninest
Copy link

ninest commented Jun 7, 2022

I was getting the same error error trying to run gh-ost as a library: panic: runtime error: integer divide by zero. It is necessary to set the interval

// Cannot be 0
migrationContext.HooksStatusIntervalSec = 1

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 a pull request may close this issue.

2 participants