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

Status message is not properly formatted and contains MISSING on STDERR #1373

Closed
icyflame opened this issue Jan 31, 2024 · 1 comment
Closed

Comments

@icyflame
Copy link
Contributor

We recently upgraded from gh-ost v1.0.48 to v1.1.6. Starting in this version, we started seeing the string MISSING in our status messages:

2024-01-31 12:49:54 INFO Copy: 0/0 100.0%!;(MISSING) Applied: 0; Backlog: 0/1000; Time: 0s(total), 0s(copy); streamer: mysql_bin.000002:79674; Lag: 0.00s, HeartbeatLag: 0.02s, State: migrating; ETA: due

The string MISSING is generally shown when fmt.Sprintf is used with a formatting directive, but the appropriate variable value to replace the formatting directive is missing.

Using git bisect, I found that this particular issue was introduced in the commit 515aa72 as part of the PR #1194. The migration context logger prints information that is being printed to STDOUT to STDERR as well, with the local time as a prefix. The motivation for this is unclear from the PR's description.

If this is a bug report, please provide a test case (e.g., your table definition and gh-ost command) and the error output.

Table definition:

root@localhost [test] > show create table users \G
*************************** 1. row ***************************
       Table: users
Create Table: CREATE TABLE `users` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(32) NOT NULL,
  `email` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=101 DEFAULT CHARSET=utf8
1 row in set (0.00 sec)

gh-ost command:

$ ./gh-ost --host=127.0.0.1 --conf=/gh-ost.cnf --database=test --table=users --alter="engine=innodb" --chunk-size=2000 --max-load=Threads_connected=20 --initially-drop-ghost-table --initially-drop-old-table --test-on-replica --switch-to-rbr --verbose
@icyflame
Copy link
Contributor Author

This issue was fixed after the above PR was merged ✅

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

No branches or pull requests

1 participant