Closed (fixed)
Project:
IMCE
Version:
7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Jan 2011 at 15:05 UTC
Updated:
1 Feb 2011 at 21:10 UTC
Jump to comment: Most recent file
Drupal 6.20 ->7.0 site
7001 - Removes {imce_files} in favor of {file_usage} never finish. Left if running for almost two hours but the only thing that happen is that is consume a lot of CPU. "drush updatedb" fails after a few minutes with:
Error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 260 bytes) in /Applications/drush/includes/context.inc, line 2254
Had a look into imce_files table but there is just a few files there:
SELECT * FROM `imce_files`
-> ;
+-----+
| fid |
+-----+
| 17 |
| 18 |
| 19 |
| 20 |
| 118 |
| 119 |
| 120 |
| 121 |
+-----+
8 rows in set (0.00 sec)
Some quick debugging where I dump the result and break out of the upgrade:
$result = db_query_range('SELECT i.fid FROM {imce_files} i INNER JOIN {file_managed} f ON i.fid = f.fid WHERE i.fid > :fid ORDER BY i.fid', 0, $limit, array(':fid' => $sandbox['last_fid_processed']))->fetchAll();
var_dump($result);
return;
But it returns a empty array:
array(0) {
}
Attaching the content of the "file_managed" table. Pls let me know if there more I can do to help you out.
--
Steinmb
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | imce.install.1024338-5.patch | 2.79 KB | ufku |
| #1 | imce.install.patch | 1.4 KB | ufku |
| file_managed.txt | 2.79 KB | steinmb |
Comments
Comment #1
ufku commentedI think the count query should be
SELECT COUNT(*) FROM {imce_files} i INNER JOIN {file_managed} f ON i.fid = f.fidThe patch also adds a progress check to prevent an infinite loop.
Comment #2
steinmb commentedBefore I test the patch I wanted to let you know that the count query is returning "8" something that I think is correct according to the content of "imce_files".
Comment #3
steinmb commentedRrrright, without further due tested I the patch. 7001 is now getting out the loop but I'm unable to find any of the fid from imce_files in file_managed that is identical to the attached text file in #1. This should also be checked some how before we destroy the org. data table.
Comment #4
adellefrank commentedsubscribing
Comment #5
ufku commentedIt appears IMCE needs to migrate its own files to the new {file_managed} table. I somehow thought that the core already migrated all files from {files} table.
Attached patch also fixes an error in update_7000.
Comment #6
ufku commentedThis was committed. Feel free to re-open in case the bug is still there.
Comment #7
steinmb commentedSorry about the missing feedback on #5, have been unable to find time to proper test it. I'll reopen if needed.
Thanx! :)