| Bug #48560 | Shutdown reporter shuts down mysqld before validators are done | ||
|---|---|---|---|
| Submitted: | 5 Nov 2009 10:35 | Modified: | 9 Jan 2015 14:39 |
| Reporter: | John Embretsen | Email Updates: | |
| Status: | Won't fix | Impact on me: | |
| Category: | Tools: Random Query Generator | Severity: | S3 (Non-critical) |
| Version: | OS: | Any | |
| Assigned to: | Bernt Marius Johnsen | CPU Architecture: | Any |
[5 Nov 2009 10:35]
John Embretsen
[5 Nov 2009 10:37]
John Embretsen
Correction to a sentence above: The problem is that the shutdown is sometimes exexuted _before_ other operations have finished. :)
[5 Nov 2009 11:12]
Philip Stoev
The final dump + compare between two servers is not a Validator or a Reporter, it is a hard-coded part at the end of the runall.pl script. The general solution for this bug is to remove the "scripts calling scripts" paradigm and to match the starting and the stopping of the server so that they happen within the same logical block. Currently, the server is started in runall.pl and stopped by a Reporter in gentest.pl , which is not the same logical block. Also, there is a killall statement at the end of pb2gentest.pl in order to prevent any stray mysqlds from causing PB2 to hang. PB2 expects that all started processes have exited before it declares a test complete, not just the main process.
[5 Nov 2009 12:10]
John Embretsen
On closer inspection it seems this has nothing to do with the ResultsetComparator per se, because the decision to compare db dumps is made in runall.pl, based on the number of basedirs specified (or if using replication):
#
# Compare master and slave, or two masters
#
if ($rpl_mode || (defined $basedirs[1])) {
...
Also, the comparison is made using system(diff), which probably won't work well on Windows...
[5 Nov 2009 12:11]
John Embretsen
(Sorry, I did not see Philip's comment before sending in my last comment.)
[5 Nov 2009 12:29]
Philip Stoev
diff.exe is available on PB2 machines, in a directory that is added to PATH in pb2gentest.pl But John is right in principle, we should remove our dependency on diff if possible. However, MTR have a long and sad history with this. Furthermore, perl-based diff modules take a huge ammount of memory, so a C implementation would probably be inevitably needed.
