DanielAuerX commented on PR #1326:
URL: https://github.com/apache/answer/pull/1326#issuecomment-2845717502

   When I was looking into how files are deleted, I noticed some issues with 
the file_record table. This is actually related to the problem of keeping the 
file system and the db in sync.
   
   - Not all uploaded files (branding and avatar) are added to the file_record, 
leading to the file_record being incomplete
   -  If a question (or answer) is deleted, it is not being checked if the text 
body contained a reference to a file/image. Therefore, the question is deleted, 
but the file_record entry is not being updated and the image remains in the 
file system.
   - The file record_entity is not registered in init_data.go, therefore the 
table is not being created in the first place and no files are deleted at all. 
This also causes an error log whenever the clean up cron job is running.
   
   I might missed or misunderstood some things, but I am quite sure there is 
something wrong here


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@answer.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to