View Issue Details

IDProjectCategoryView StatusLast Update
0020540mantisbtattachmentspublic2023-10-31 16:36
Reportervboctor Assigned Todregad  
PriorityhighSeveritymajorReproducibilityalways
Status assignedResolutionreopened 
Product Version1.2.16 
Target Version2.27.0 
Summary0020540: Implement upgrade step to cleanup corrupt disk attachments after db->disk conversion
Description
  1. Set [ $g_file_upload_method = DISK; ] and configure [ $g_absolute_path_default_upload_folder ] in config_inc.php
  2. Report an issue with attachment.
  3. Check the attachment in mantis_bug_file_table, the content is not null. However, the disk file is also existed in the folder.

3a. If access /admin/move_attachments_page.php, the attachment count is not 0.
3b. If administrator do 'move to disk', the 'diskfile' will be mapping to a new place which file size is 2 bytes. Thus no one can download correct file content.

query result the attachment:
<pre>
+----+--------+-------+-------------+----------------------------------+--------------+---------------------------------------+----------+-----------+---------+------------+---------+
| id | bug_id | title | description | diskfile | filename | folder | filesize | file_type | content | date_added | user_id |
+----+--------+-------+-------------+----------------------------------+--------------+---------------------------------------+----------+-----------+---------+------------+---------+
| 5 | 4 | | | b66c36fbdc246d15ca50cb51073b0aca | tempfile.PNG | /volume1/web/wnbu/mantis-attachments/ | 17893 | image/png | '' | 1449109357 | 2 |
+----+--------+-------+-------------+----------------------------------+--------------+---------------------------------------+----------+-----------+---------+------------+---------+
</pre>

TagsNo tags attached.

Relationships

related to 0020340 closeddregad Attachment is saved to disk and database at the same time 

Activities

vboctor

vboctor

2016-06-04 19:45

manager   ~0053266

This is not a blocking issue for 1.3.x, since the issue is fixed and we just need a cleanup task in check.php that can be done at any point in time. It can also be done in 1.2.x or 1.3.x or 1.4.x, etc.

Let's use 0020340 to track the future work to do cleanup. Delaying 1.3.x for this is just creating more bad db blobs for customers using 1.2.x.

dregad

dregad

2016-08-15 04:40

developer   ~0053806

Reopening to track the implementation of the schema upgrade cleanup step, as mentioned in 0020340:0053805.