-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WL#15369 Add progress information to the error log during shutdown
Problem: -------- - During shutdown, there're multiple phases like closing connections, plugins shutdown, components shutdown where server does significant amount of work but in error-logs, neither there's indication of progress information for work done in those phases, nor there's indication of start & end of such phases. - During shutdown, components infrastructure is shutdown after we report "Shutdown complete" in error logs, which makes error logs "a little less intuitive". - Error logs during shutdown of server started with --initialize[-insecure] end abruptly without proper shutdown message. - During closing connections phase, even after "forcefully closing" threads, there might be some threads still shutting down, which might make server to wait for some time. Fix: ---- - Inclusion of "Start of Phase" and "End of Phase" messages for closing connections, plugins shutdown, and components shutdown phases during server shutdown, to give user more context around what server is doing, and how long the phase lasted. - Inclusion of messages indicating start & end of error logs, having distinct messages for server started with --initialize flag. - Inclusion of logs about number of threads (which are still alive), and their identity just before server can "potentially" wait. Change-Id: I8f3dfc8436240977569639286cde6ea03b3164ab
- Loading branch information
Showing
20 changed files
with
501 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# connect as root from root_con1, and make the thread sleep | ||
SET DEBUG="+d,simulate_connection_thread_hang"; | ||
SELECT 1; | ||
# connect as root from root_con2, and make the thread sleep | ||
SET DEBUG="+d,simulate_connection_thread_hang"; | ||
SELECT 1; | ||
# --------------------------------------------------- | ||
# shut server down | ||
# Server is down | ||
# close the test connections | ||
# --------------------------------------------------- | ||
# Read the logs | ||
# looking for ER_THREAD_STILL_ALIVE | ||
Pattern "Waiting for forceful disconnection of Thread" found | ||
# Search completed | ||
# looking for ER_NUM_THREADS_STILL_ALIVE | ||
Pattern "Waiting for forceful disconnection of" found | ||
# Search completed | ||
# --------------------------------------------------- | ||
# Clean Up | ||
# --------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# --------------------------------------------------- | ||
# shut server down | ||
# Server is down | ||
# --------------------------------------------------- | ||
# Run the server with --initialize | ||
# --------------------------------------------------- | ||
# extract the root password | ||
password found | ||
# --------------------------------------------------- | ||
# Restart the server against DDIR, and connect | ||
# connect as root | ||
# reset the password | ||
SET PASSWORD=''; | ||
CREATE DATABASE test; | ||
# --------------------------------------------------- | ||
# shut server down | ||
# Server is down | ||
# close the test connection | ||
# --------------------------------------------------- | ||
# Read the logs | ||
# Looking for ER_SRV_INIT_START | ||
Pattern "MySQL Server Initialization - start" found | ||
# Search completed | ||
# Looking for ER_SRV_INIT_END | ||
Pattern "MySQL Server Initialization - end" found | ||
# Search completed | ||
# Looking for ER_SRV_START | ||
Pattern "MySQL Server - start" found | ||
# Search completed | ||
# Looking for ER_CONNECTIONS_SHUTDOWN_START | ||
Pattern "MySQL Server: Closing Connections - start" found | ||
# Search completed | ||
# Looking for ER_CONNECTIONS_SHUTDOWN_END | ||
Pattern "MySQL Server: Closing Connections - end" found | ||
# Search completed | ||
# Looking for ER_PLUGINS_SHUTDOWN_START | ||
Pattern "MySQL Server: Plugins Shutdown - start" found | ||
# Search completed | ||
# Looking for ER_PLUGINS_SHUTDOWN_END | ||
Pattern "MySQL Server: Plugins Shutdown - end" found | ||
# Search completed | ||
# Looking for ER_COMPONENTS_INFRASTRUCTURE_SHUTDOWN_START | ||
Pattern "MySQL Server: Components Shutdown - start" found | ||
# Search completed | ||
# Looking for ER_COMPONENTS_INFRASTRUCTURE_SHUTDOWN_END | ||
Pattern "MySQL Server: Components Shutdown - end" found | ||
# Search completed | ||
# Looking for ER_SRV_END | ||
Pattern "MySQL Server - end" found | ||
# Search completed | ||
# --------------------------------------------------- | ||
# Clean Up | ||
# delete mysqld log | ||
# delete datadir | ||
# delete password | ||
# --------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.