| Bug #40302 | error on tablespace creation is not handled cleanly | ||
|---|---|---|---|
| Submitted: | 24 Oct 2008 14:37 | Modified: | 13 Dec 2008 11:05 |
| Reporter: | Daniel Fischer | ||
| Status: | Closed | ||
| Category: | Server: Falcon | Severity: | S2 (Serious) |
| Version: | OS: | Other (UNIX) | |
| Assigned to: | Vladislav Vaintroub | Target Version: | 6.0-beta |
| Tags: | F_TABLESPACE | ||
| Triage: | Triaged: D2 (Serious) | ||
[24 Oct 2008 14:37]
Daniel Fischer
[24 Oct 2008 16:26]
Vladislav Vaintroub
Daniel, can you please specify falcon version that you're using. Falcon creates files with O_CREAT|O_EXCL now, it was different in the past. so there should be no way we open an existing file.stat() is obsolete actually.
[24 Oct 2008 18:00]
Daniel Fischer
molly:falcon df$ grep "CREAT.*EXCL" *cpp IO.cpp: fileId = ::open (fileName.getString(),O_CREAT | O_RDWR | O_RANDOM | O_EXCL | O_BINARY, SerialLogFile.cpp: handle = ::open(filename, O_RDWR | O_BINARY | O_CREAT|O_EXCL, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
[24 Oct 2008 18:19]
Vladislav Vaintroub
got it after reading the bug description once again. Tablespace not created, but present in falcon system tables.
[5 Nov 2008 17:32]
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/57916 2899 Vladislav Vaintroub 2008-11-05 Bug #40302 error on tablespace creation is not handled cleanly Problem: If tablespace.create() fails, system transaction that updates tablespace info is not rolled back. It can be possibly commited with the next system transaction, that will add a tablespace to system tables even if datafile does not exist. Additionally, createTableSpace log record (indicating creation of datafile) that logically belongs to the same transaction as system tables and has the same transaction id was wrongly written after "commit". With this patch, - there is a rollback in case of error and appropriate cleanup in the filesystem - createTableSpace now belongs to the same transaction that changes system tables.
[5 Nov 2008 18:59]
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/57926 2904 Vladislav Vaintroub 2008-11-05 Bug #40302 error on tablespace creation is not handled cleanly Problem: If tablespace.create() fails, system transaction that updates tablespace info is not rolled back. It can be possibly commited with the next system transaction, that will add a tablespace to system tables even if datafile does not exist. Additionally, createTableSpace log record (indicating creation of datafile) that logically belongs to the same transaction as system tables and has the same transaction id was wrongly written after "commit". With this patch, - there is a rollback in case of error and appropriate cleanup in the filesystem - createTableSpace now belongs to the same transaction that changes system tables.
[20 Nov 2008 13:55]
Bugs System
Pushed into 6.0.9-alpha (revid:vvaintroub@mysql.com-20081105175843-z3kinij0dao9jxwo) (version source revid:vvaintroub@mysql.com-20081105175843-z3kinij0dao9jxwo) (pib:5)
[13 Dec 2008 11:05]
MC Brown
A note has been added to the 6.0.9 changelog: Creation of a tablespace file within FALCON could create a tablespace entry in the INFORMATION_SCHEMA.FALCON_TABLESPACE_IO even the underlying data file had not been created.
