Understanding "Removing orphaned submission_files entry ID XXX with submission_id XXX"

Hello,

I am working on upgrading multiple OJS stable-3.2 to lts-3.3, and I am finding that in the upgrade process I am getting complaints like this:

2024-06-14 17:18:02 [migration: PKPv3_3_0UpgradeMigration]
Removing orphaned submission_files entry ID 1362 with submission_id 654
Removing orphaned submission_files entry ID 3975 with submission_id 1111
Removing orphaned submission_files entry ID 5433 with submission_id 1362
Removing orphaned submission_files entry ID 5459 with submission_id 1368
Removing orphaned submission_files entry ID 5460 with submission_id 1368
...

Before going on, I would like to get a good understanding of why this might happen and the long term implications.

From the message, I guess that OJS is trying to maintain the integrity of the DB by removing references to files that it does not find on disk (in other words, the DB and the file system are not synchronized).

Funny part, it’s not just the missing file, it’s that most of the items listed no longer exist in the DB… that is kind of wired.

So, I wonder if any or all of these reasons can justify entries of this type:

  1. Delete article’s feature: older versions of OJS allowed the deletion of articles. It left this function undefined references.
  2. Disk recovery: The provider where we have the server has the DB and the disk in different storages. The error may be due to a recovery of a previous snapshot of files without recovering the DB.
  3. Connectivity problems: Connection failure (either on client or server) during the upload of a file.
  4. Previous problem: Most of them are OJS that come from version 2.x. Could it be that these are previous integrity errors that 3.3 now detects and surfaces?
  5. Virus or backup issue: Although here it’s not the case in forum fellows report issues with backup sync or virus where files were removed.
  6. Others: Is there any other reason for this?

About the long term impact, I can imagine the answer but I prefer your expert opinion.
Obviously, if the file does not exist, OJS is not going to be able to invent it… so by removing the reference, it will be as if it never existed, no?

Final question… I have been searching through different backups and have located some of the remaining files (some in v2, others in v3 filename format). I understand that if I add the file and its name follows the v3 syntax it will find it and the error will disappear (?) but if it is in v2, it will not be able to retrieve it.

So the question is: Is there an easy way to rename files from v2 to v3 without doing the upgrade again? If not, is there any equivalence table to convert the names (e.g. CM is 1-9, the date is the creation date…) to create an script to do the job?

Thanks for your time!

Related posts

Hi @marc,

During upgrades, when we correct database integrity issues, we always error on the side of caution.

The message…

Removing orphaned submission_files entry ID [abcd] with submission_id [xyz]

…indicates that it’s the submission that’s missing, not the file. The only way a submission’s entry (in the submissions table) can be missing is if it was deleted; past releases of OJS have left bits and pieces lying around in the process when deleting a submission, and we are simply cleaning those up during upgrade.

We would not remove a submission_files entry in case of a missing file in the filesystem – that would be much riskier.

Regards,
Alec Smecher
Public Knowledge Project Team

Perfect. I understood the warning message exactly backwards. :blush:
No further questions, your honor. :wink:

Thank you Alec for the detailed reply.
I am more reassured to see things like this in my upgrade logs.

1 Like