From 82fc35475c160df1cf911df3c49972c9927d4d7c Mon Sep 17 00:00:00 2001 From: He Zhenxing Date: Fri, 6 Mar 2009 17:32:00 +0800 Subject: BUG#22082 Slave hangs(holds mutex) on "disk full" When disk is full, server may waiting for free space while writing binlog, relay-log or MyISAM tables. The server will continue after user have freed some space. But the error message printed was not quite clear about the how often the error message is printed, and there will be a delay before the server continue and user freeing space. And caused users thinking that the server was hanging forever. This patch fixed the problem by making the error messages printed more clear. The error message is split into two part, the first part will only be printed once, and the second part will be printed very 10 times. Message first part: Disk is full writing '' (Errcode: ). Waiting for someone to free space... (Expect up to 60 secs delay for server to continue after freeing disk space) Message second part: Retry in 60 secs, Message reprinted in 600 secs --- mysys/my_write.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'mysys/my_write.c') diff --git a/mysys/my_write.c b/mysys/my_write.c index 9ff7babab31..4df7e75b953 100644 --- a/mysys/my_write.c +++ b/mysys/my_write.c @@ -54,10 +54,8 @@ uint my_write(int Filedes, const byte *Buffer, uint Count, myf MyFlags) if ((my_errno == ENOSPC || my_errno == EDQUOT) && (MyFlags & MY_WAIT_IF_FULL)) { - if (!(errors++ % MY_WAIT_GIVE_USER_A_MESSAGE)) - my_error(EE_DISK_FULL,MYF(ME_BELL | ME_NOREFRESH), - my_filename(Filedes),my_errno,MY_WAIT_FOR_USER_TO_FIX_PANIC); - VOID(sleep(MY_WAIT_FOR_USER_TO_FIX_PANIC)); + wait_for_free_space(my_filename(Filedes), errors); + errors++; continue; } -- cgit v1.2.1