View Issue Details

IDProjectCategoryView StatusLast Update
0020540mantisbtattachmentspublic2017-12-04 02:26
ReportervboctorAssigned Todregad 
PriorityhighSeveritymajorReproducibilityalways
Status assignedResolutionreopened 
Product Version1.2.16 
Target Version2.10.0Fixed in Version 
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:

+----+--------+-------+-------------+----------------------------------+--------------+---------------------------------------+----------+-----------+---------+------------+---------+
| 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 |
+----+--------+-------+-------------+----------------------------------+--------------+---------------------------------------+----------+-----------+---------+------------+---------+
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.

Issue History

Date Modified Username Field Change
2016-01-25 12:28 vboctor New Issue
2016-01-25 12:28 vboctor Status new => assigned
2016-01-25 12:28 vboctor Assigned To => dregad
2016-01-25 12:28 vboctor Issue generated from: 0020340
2016-01-25 12:28 vboctor Relationship added related to 0020340
2016-06-04 19:45 vboctor Assigned To dregad => vboctor
2016-06-04 19:45 vboctor Status assigned => resolved
2016-06-04 19:45 vboctor Resolution open => won't fix
2016-06-04 19:45 vboctor Note Added: 0053266
2016-06-12 00:44 vboctor Status resolved => closed
2016-06-12 02:19 atrol Target Version 1.3.0-rc.2 =>
2016-08-15 04:40 dregad Assigned To vboctor => dregad
2016-08-15 04:40 dregad Status closed => assigned
2016-08-15 04:40 dregad Resolution won't fix => reopened
2016-08-15 04:40 dregad Target Version => 1.3.1
2016-08-15 04:40 dregad Note Added: 0053806
2016-08-15 04:51 dregad Description Updated View Revisions
2016-08-15 04:52 dregad Summary Attachment is saved to disk and database at the same time (1.3.x) => Implement upgrade step to cleanup corrupt disk attachments after db->disk conversion
2016-08-28 10:37 atrol Target Version 1.3.1 => 1.3.2
2016-10-02 19:36 atrol Target Version 1.3.2 => 1.3.3
2016-10-30 23:23 vboctor Target Version 1.3.3 => 1.3.4
2016-11-27 08:22 dregad Target Version 1.3.4 => 1.3.5
2016-12-30 16:24 atrol Target Version 1.3.5 => 1.3.6
2017-02-01 22:47 vboctor Target Version 1.3.6 => 1.3.7
2017-02-26 21:19 vboctor Target Version 1.3.7 => 2.3.0
2017-04-01 00:20 vboctor Target Version 2.3.0 => 2.4.0
2017-04-30 14:53 vboctoradmin Target Version 2.4.0 => 2.5.0
2017-06-04 16:19 atrol Target Version 2.5.0 => 2.6.0
2017-09-03 18:49 vboctor Target Version 2.6.0 => 2.7.0
2017-10-08 23:56 vboctor Target Version 2.7.0 => 2.8.0
2017-10-28 19:14 vboctor Target Version 2.8.0 => 2.9.0
2017-12-04 02:26 vboctor Target Version 2.9.0 => 2.10.0