Bug #38377 Options falcon_serial_log_dir does not have any effect
Submitted: 25 Jul 2008 14:38 Modified: 8 Jan 2009 10:35
Reporter: Olav Sandstå Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S3 (Non-critical)
Version:6.0.6 OS:Any
Assigned to: Lars-Erik Bjørk CPU Architecture:Any

[25 Jul 2008 14:38] Olav Sandstå
Description:
When I start MySQL with Falcon and specify that the serial log files should be placed in a specific directory, e.g:

  --falcon_serial_log_dir=/export/home2/tmp/mysql-log/falcon

does does not seem to have any effect. The serial log files are place in the same directory as the data base files.

A similar problem was reported in bug #31005. This bug report was closed based on having verified that this worked. It seems like an error have been introduced that have re-introduced this problem.

How to repeat:
Start MySQL with falcon and specify --falcon_serial_log_dir to a directory different from the default database directory.
[25 Jul 2008 16:46] Hakan Küçükyılmaz
Olav, I can't repeat with latest source of mysql-6.0-falcon bzr tree:

root@lu0011:/data/mysql# mysqld_safe --falcon_serial_log_dir=/data/log/mysql60 &
[1] 6343
root@lu0011:/data/mysql# 080725 18:51:05 mysqld_safe Logging to '/data/mysql/lu0011.err'.
080725 18:51:05 mysqld_safe Starting mysqld daemon with databases from /data/mysql

root@lu0011:/data/mysql#
root@lu0011:/data/mysql#
root@lu0011:/data/mysql#
root@lu0011:/data/mysql# ls
falcon_master.fts     falcon_user.fts  laptopbattle_stuttgart  lu0011.pid          maria_log_control  sulo
falcon_temporary.fts  laptopbattle     lu0011.err              maria_log.00000001  mysql
root@lu0011:/data/mysql# ls /data/log/mysql60/
falcon_master.fl1  falcon_master.fl2
[25 Jul 2008 17:48] Olav Sandstå
Hakan, thanks for looking into this.

After some experimenting it seems like the difference between my case and your case is that the you have provided a directory to --falcon_serial_log_dir that exists while when I tried this out I had provided a non-existing directory. 

Example: The directory I gave as argument to falcon_serial_log_dir was /export/home2/tmp/mysql-log/falcon while only /export/home/tmp/mysql-log existed. If I create the falcon directory I too get the falcon log files in this directory. 

Still, I would have preferred that MySQL/Falcon gave an error message in this case instead of just creating the serial log files in the default directory.
[25 Jul 2008 17:51] Olav Sandstå
The way InnoDB handles the similar situation is:

1. Refuse to start.
2. Writes the following to the error file:

080725 19:37:31  InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
InnoDB: If you are installing InnoDB, remember that you must create
InnoDB: directories yourself, InnoDB does not create them.
InnoDB: File name /export/home2/tmp/mysql-log/innodb/ib_logfile0
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.

I think this behavior is better than how Falcon currently handles this user error.
[25 Jul 2008 17:51] Hakan Küçükyılmaz
Verified. When providing a not existing directory for falcon_serial_log_dir, then Falcon still starts without providing an error message.
[18 Aug 2008 17:16] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/51867

2787 lars-erik.bjork@sun.com	2008-08-18
      A fix for bug#38377 - Options falcon_serial_log_dir does not have any effect
[19 Aug 2008 14:28] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/51963

2790 lars-erik.bjork@sun.com	2008-08-19
      A fix for bug#38377 - Options falcon_serial_log_dir does not have any effect
[19 Aug 2008 14:29] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/51965

2790 lars-erik.bjork@sun.com	2008-08-19
      A fix for bug#38377 - Options falcon_serial_log_dir does not have any effect
[28 Aug 2008 4:34] Bugs System
Pushed into 6.0.7-alpha  (revid:lars-erik.bjork@sun.com-20080819142742-py11yha13tx2agqf) (version source revid:vvaintroub@mysql.com-20080827094944-sh582y3m7duhzrpj) (pib:3)
[28 Aug 2008 14:53] Kevin Lewis
This patch went into version 6.0.7, but on some machines, it causes 'Invalid serial log directory path' to be issued.  Follow-on bug is Bug#39098
[13 Sep 2008 22:34] Bugs System
Pushed into 6.0.6-alpha  (revid:lars-erik.bjork@sun.com-20080819142742-py11yha13tx2agqf) (version source revid:hakan@mysql.com-20080716105246-eg0utbybp122n2w9) (pib:3)
[8 Jan 2009 10:34] MC Brown
A note has been added to the 6.0.7 changelog: 

When specifying an alternative log directory for FALCON using serial_log_directory the operation would fail silently if the directory did not exist. MySQL will now fail to start if the serial log in the specified directory cannot be opened or created, or if the falcon_master.fts cannot be opened or created.