Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
The error on that page seems to result from a release record being present when the file is not. I vaguely thought that the cron-called directory scanning took care of that, pseudo-'deleting' unavailable releases. In any case, I guess we should test for the existance of a release file before trying to determine its size.
therefore, i'm marking this as postponed -- basically, let's not worry about it until the re-write of all the project-release handling, and then the problem will basically go away. ;)
actually, this is still potentially a problem, even with the new release system. :( i've considered just storing the filesize in the DB, along with the file date and md5hash (which we do already). if we're going to store those, seems kinda silly not to just store the filesize, too. this would also vastly speed things up where we're showing lots of releases on the same page.
This is still broken in cases where you have a file_path but no file (e.g. the d.o testing install profile) and it's driving me nuts. Furthermore, I think it's going to be important for #357926: Port project_release to views2 to have the filesize in the DB so we can include that in the various views involving release nodes. Either way, it seems like caching the filesize in the DB instead of touching the filesystem all the time is going to be a big performance optimization.
Therefore, we should add a "file_size" column to the {project_release_nodes} table and populate that during either file upload or in the packaging script, depending on how the file_path itself is set (which currently depends on if cvs is enabled for a given project). We'll also need a DB update to find the filesizes for all existing release nodes (can you say "batch"?).
Comments
Comment #1
nedjoThe error on that page seems to result from a release record being present when the file is not. I vaguely thought that the cron-called directory scanning took care of that, pseudo-'deleting' unavailable releases. In any case, I guess we should test for the existance of a release file before trying to determine its size.
Comment #2
nedjoComment #3
dwwthanks for the investigation and more useful info, nedjo -- killes's report was awfully terse... ;)
that said, i'm fairly uninterested in spending much effort fixing this since:
therefore, i'm marking this as postponed -- basically, let's not worry about it until the re-write of all the project-release handling, and then the problem will basically go away. ;)
sound good?
-derek
Comment #4
nedjoSounds good.
Comment #5
dwwactually, this is still potentially a problem, even with the new release system. :( i've considered just storing the filesize in the DB, along with the file date and md5hash (which we do already). if we're going to store those, seems kinda silly not to just store the filesize, too. this would also vastly speed things up where we're showing lots of releases on the same page.
Comment #6
dwwThis was fixed over at http://drupal.org/node/105224
Comment #7
(not verified) commentedComment #8
dwwThis is still broken in cases where you have a file_path but no file (e.g. the d.o testing install profile) and it's driving me nuts. Furthermore, I think it's going to be important for #357926: Port project_release to views2 to have the filesize in the DB so we can include that in the various views involving release nodes. Either way, it seems like caching the filesize in the DB instead of touching the filesystem all the time is going to be a big performance optimization.
Therefore, we should add a "file_size" column to the {project_release_nodes} table and populate that during either file upload or in the packaging script, depending on how the file_path itself is set (which currently depends on if cvs is enabled for a given project). We'll also need a DB update to find the filesizes for all existing release nodes (can you say "batch"?).
Comment #9
dwwThis is now fixed via storing all release files in the {files} table and the new {project_release_file} table from #357920: Numerous errors when previewing/submitting a new release node. Includes a DB update to populate filesize for all files.