Open tomkrouper opened 6 years ago
Thank you. Labeling this as high priority since it can cause data corruption.
"roatate" message originates at https://github.com/github/gh-ost/blob/d2726c77f86cb65e25bce5c0ac5fe3fa0c997488/go/binlog/gomysql_reader.go#L148
which directly uses the go-mysql
library, which seems to produce those bogus events. I'll look into.
See ongoing discussion on #627
In https://github.com/github/gh-ost/issues/627#issuecomment-414120771 it appears to me like there is no bug.
However, @tomkrouper reports gh-ost
was on mysql-bin.004134
while he pruged binlogs up to mysql-bin.004182
, which is a lot of binary logs and a lot of events, surely more than 10240
events. And yet gh-ost
did not complain. My attempt to reproduce show that gh-ost
does complain on missing binlog entries. So I'm not sure what's going on here.
@tomkrouper do you happen to have the gh-ost
log to share in private?
I'm not sure if this is a bug or gh-ost just being polite. However, I was running a gh-ost migration where disk space was at a premium, so I was periodically going through and purging binary logs along the replication chain so I wouldn't run out of disk space. Right after I pressed on purging the master binary logs, I had the realization that I had just broken the migration. I checked the output of gh-ost and saw that it was on binary log
mysql-bin.004134
and I had just purged tomysql-bin.004182
. Now, gh-ost, being the polite program it was, it realized it had reached the "end" of 4134, and continued to "read" 4135, which it couldn't find, so it moved on to the next binary and the next until it got to 4182 and continued running from there .No error message, just messages like:If gh-ost shouldn't bail out in these cases, it should at least scream loudly that it could not read the file.
cc: https://github.com/github/hookshot/pull/930