core icon indicating copy to clipboard operation
core copied to clipboard

oc_fscache lets negative numbers into mtime field, breaks syncing

Open matthewbloch opened this issue 13 years ago • 2 comments

I found this in my oc_fscache table:

mysql> select * from oc_fscache  where mtime < 0;
+------+-----------------------------------------------------------------------------------------------+----------------------------------+--------+---------------------+--------+------+------------+-------------+----------------------+----------+-----------+-----------+----------+
| id   | path                                                                                          | path_hash                        | parent | name                | user   | size | ctime      | mtime       | mimetype             | mimepart | encrypted | versioned | writable |
+------+-----------------------------------------------------------------------------------------------+----------------------------------+--------+---------------------+--------+------+------------+-------------+----------------------+----------+-----------+-----------+----------+
| 2653 | /mbloch/files/Design/2011/Flyers and Folder 2011 artwork/Flyers 2011 artwork/BigV_2011 Folder | 21b78af382bbabddcbe85d06b86aff11 |   2608 | BigV_2011 Folder    | mbloch |    0 | 1357838953 | -1726425422 | httpd/unix-directory | httpd    |         0 |         0 |        1 |
| 2663 | /mbloch/files/Design/Deliveries                                                               | de4cdd69da1226c02e16628b661a0a6d |      8 | Deliveries          | mbloch |    0 | 1357838967 | -1726430953 | httpd/unix-directory | httpd    |         0 |         0 |        1 |
| 2676 | /mbloch/files/Design/2011/Flyers and Folder 2011 artwork/Folder 2011 artwork                  | bb8808f40ef37b761b534bbb40b9bcb7 |   2607 | Folder 2011 artwork | mbloch |    0 | 1357838947 | -1726425205 | httpd/unix-directory | httpd    |         0 |         0 |        1 |
+------+-----------------------------------------------------------------------------------------------+----------------------------------+--------+---------------------+--------+------+------------+-------------+----------------------+----------+-----------+-----------+----------+
3 rows in set (0.00 sec)

The negative mtimes were causing the webdav implementation to throw 500s as PHP couldn't turn them into sensible dates, so my top level "Design" stopped syncing. I fixed it with:

update oc_fscache set mtime=ctime where mtime<0;

which I suspect might cause some unnecessary syncing. But I'm not sure those negative numbers should have been allowed into that table in the first place.

matthewbloch avatar Jan 11 '13 14:01 matthewbloch

@icewind1991

karlitschek avatar Feb 09 '13 12:02 karlitschek

I’m closing this bug because it has been inactive for a few months. This probably means it’s not reproducible or it has been fixed in a newer version.

Please reopen if the error still persists with ownCloud 5.0.9 (the latest stable version) and then please use the issue template. You an also contribute directly by providing a patch – see the developer manual. :)

Thank you!

jancborchardt avatar Aug 05 '13 12:08 jancborchardt