Commit 6f6dec8
committed
"WARNING: NamedStopwatch.Stop("instance")
IsRunning is false"
https://jira.percona.com/browse/DISTMYSQL-232
The problem is caused by NamedStopwatch implementation which writes this
warning. There is no way to suppress this warning. NamedStopwatch also
does not have a method like IsRunning() to learn its state.
The problem was that stopwatch was stopped after the error returned by
Ping(). The cleanup part of the function expects the stopwatch to be
started.
Please note that the original code suffers the same problem.
If OpenDiscovery() failed, the stopwatch was stopped and the control
directly went to Cleanup causing a warning print. The same is for
the branch after checkMaxScale() call.
As there were no complaints about the original behavior I decided to
solve the problem in the simplest way. In case of Ping() failure, we do
not stop the stopwatch and go directly to Cleanup.1 parent e7b23d9 commit 6f6dec8
1 file changed
+6
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
| 383 | + | |
390 | 384 | | |
391 | 385 | | |
392 | 386 | | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
393 | 392 | | |
394 | 393 | | |
395 | 394 | | |
| |||
0 commit comments