File lost after restart
daniel at telesat.co.jp
Wed Jun 11 08:28:19 UTC 2008
Hi, I have a reproducible problem with the svn version of mogilefs.
If I store a file using mogtool or perl and restart mogilefsd and
mysql, the last file stored
still in the mogstored server after the restart but is deleted later
I checked mysql tables and found that the fid of the stored file is
listed in tempfile:
select * from tempfile;
| fid | createtime | classid | dmid | dkey | devids |
| 29 | 1213149028 | 0 | 99 | _server_startup_test | NULL |
| 30 | 1213149028 | 0 | 99 | _server_startup_test | NULL |
select * from file;
| fid | dmid | dkey | length | classid | devcount |
| 27 | 1 | reboot1.png | 27073 | 1 | 2 |
| 29 | 1 | /images/ballicon.png | 27073 | 0 | 2 |
select * from file_on order by fid;
| fid | devid |
| 27 | 201 |
| 27 | 301 |
| 29 | 201 |
| 29 | 301 |
In this case fid=29 is deleted from all the mogstores by one of the
workers when the tempfile record goes too old.
My system is a Centos 5.1 on Xen. I'm using the startup scripts that
was posted in this maillist some time ago:
I trace the problem and as a workaround i add a condition to the sql
in the function
old_tempfiles() in the file Store.pm
return $self->dbh->selectall_arrayref("SELECT fid, devids FROM
tempfile " .
- "WHERE createtime < " .
$self->unix_timestamp . " - $secs_old LIMIT 50");
+ "WHERE dmid<>99 and
createtime < " . $self->unix_timestamp . " - $secs_old LIMIT 50");
This will stop the file losing but I will keep stacking records in
Have anyone an approppiate way to fix this?.
More information about the mogilefs