1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

InnoDB: Avoid test suite failures caused by a locking conflict

between two server instances at server shutdown/startup.
This conflict on advisory locks appears to be the result of a bug
in the operating system; these locks should be released when the
files are closed, but somehow that does not always happen
immediately in Linux.  (Bug #9381)


innobase/include/os0file.h:
  Add OS_FILE_OPEN_RETRY for os_file_create()ing ibdata1
innobase/os/os0file.c:
  os_file_lock(): Do not close the file on failure, but let the
  callers do that.
  os_file_create(): If create_mode==OS_FILE_OPEN_RETRY and
  os_file_lock() fails, keep retrying for 100 seconds.
innobase/srv/srv0start.c:
  open_or_create_data_files(): Open the first data file with
  OS_FILE_OPEN_RETRY, to resolve a conflict with a shutting-down
  instance of the MySQL server.
This commit is contained in:
unknown
2005-04-06 15:09:15 +03:00
parent d5b7547597
commit cde615c9cb
3 changed files with 30 additions and 4 deletions

View File

@ -789,6 +789,11 @@ open_or_create_data_files(
files[i] = os_file_create(
name, OS_FILE_OPEN_RAW, OS_FILE_NORMAL,
OS_DATA_FILE, &ret);
} else if (i == 0) {
files[i] = os_file_create(
name, OS_FILE_OPEN_RETRY,
OS_FILE_NORMAL,
OS_DATA_FILE, &ret);
} else {
files[i] = os_file_create(
name, OS_FILE_OPEN, OS_FILE_NORMAL,