[fixed] Versions of permanently deleted files are never deleted from storage

Updating a file stored on a datasource with versioning policy enabled creates new version-files on datasource ‘versions’ as expected. However, permanently deleting the file removes only the latest version-file leaving all the previous versions untracked and abandoned.

Workflow:

ezgif.com-gif-maker

  1. Create 3 versions of a file
  2. Verify the version-files are created as well
  3. Check the actual storage
  4. Permanently delete the file
  5. Check whether version-files were deleted from the database
  6. Ensure the last version was transformed into a recovery-file
  7. Permanently delete the recovery-file
  8. Check the actual storage

Logs:

2022-04-29T11:51:54.200Z	INFO	pydio.grpc.versions	Storing Version for node 	{"OperationUuid": "versioning-job-43d7b6b6", "NodeUuid": "e30d6720-16b2-4ca2-a401-bfb39e42a78a"}
2022-04-29T11:51:55.149Z	INFO	pydio.grpc.search	Flushing search batch	{"size": 1}
2022-04-29T11:52:07.502Z	INFO	pydio.grpc.versions	Storing Version for node 	{"OperationUuid": "versioning-job-a7617330", "NodeUuid": "e30d6720-16b2-4ca2-a401-bfb39e42a78a"}
2022-04-29T11:52:08.460Z	INFO	pydio.grpc.search	Flushing search batch	{"size": 1}
2022-04-29T11:52:19.526Z	INFO	pydio.grpc.versions	Storing Version for node 	{"OperationUuid": "versioning-job-9a01f935", "NodeUuid": "e30d6720-16b2-4ca2-a401-bfb39e42a78a"}
2022-04-29T11:52:20.478Z	INFO	pydio.grpc.search	Flushing search batch	{"size": 1}
2022-04-29T11:55:16.830Z	INFO	pydio.grpc.tasks	Run Job users-activity-digest on timer event Iso8601Schedule:"R/2012-06-04T19:25:16.828696-07:00/PT15M" 
2022-04-29T11:55:16.831Z	INFO	pydio.grpc.tasks	Run Job flush-mailer-queue on timer event Iso8601Schedule:"R/2012-06-04T19:25:16.828696-07:00/PT5M" 
2022-04-29T11:56:28.050Z	INFO	pydio.rest.tree	Definitively deleting [personal-files/Untitled Document.txt]
2022-04-29T11:56:28.122Z	INFO	pydio.grpc.tasks	Run Job delete-9c8305ff-60df-4b5f-a060-71de0a2b73b8 on demand
2022-04-29T11:56:31.209Z	INFO	pydio.grpc.search	Flushing search batch	{"size": 1}
2022-04-29T11:58:16.831Z	INFO	pydio.grpc.tasks	Run Job internal-prune-jobs on timer event Iso8601Schedule:"R/2012-06-04T19:25:16.828696-07:03/PT10M" 
2022-04-29T11:58:16.899Z	INFO	pydio.grpc.jobs	Deleting AutoClean Job delete-848e85e8-4823-4f80-8485-c66ef8d93fd9	{"OperationUuid": "internal-prune-jobs-4163d1ba"}
2022-04-29T11:58:16.905Z	INFO	pydio.grpc.jobs	Deleting AutoClean Job delete-9c8305ff-60df-4b5f-a060-71de0a2b73b8	{"OperationUuid": "internal-prune-jobs-4163d1ba"}
2022-04-29T11:58:26.088Z	INFO	pydio.rest.tree	Definitively deleting [deleted-files/$DELETED$]
2022-04-29T11:58:26.110Z	INFO	pydio.grpc.tasks	Run Job delete-1a755875-84f3-488f-9b26-f6f257967de3 on demand
2022-04-29T11:58:26.221Z	INFO	pydio.grpc.tasks	Deleting sourceNode	{"OperationUuid": "delete-1a755875-84f3-488f-9b26-f6f257967de3-f092918d", "NodePath": "deleted-files/$DELETED$"}
|11:56:30|Finished moving deleted versions|
|---|---|
|11:56:30|[Delete Versions Task] Deleted version e30d6720-16b2-4ca2-a401-bfb39e42a78a__c39c2c1b-c7b2-11ec-b065-663d71eee41f|
|11:56:30|[Delete Versions Task] Deleted version e30d6720-16b2-4ca2-a401-bfb39e42a78a__cb8af27d-c7b2-11ec-b065-663d71eee41f|
|11:56:30|[Delete Versions Task] Moved version to versions/$DELETED$/personal/admin/Untitled Document-001-2022-04-29-d2b5a1c1.txt|
|11:56:30|Creating folder versions/$DELETED$/personal/admin|
|11:56:30|Creating folder versions/$DELETED$/personal|
|11:56:30|Creating folder versions/$DELETED$|
|11:56:30|Starting job on delete node event (triggered by user admin)|

Result: 2 from 3 version-files were left on the storage without being tracked by Pydio Cells.

Pydio Cells Home Edition 3.0.6

Hello @rotaru nice spot, thanks for the detailed report.
We can reproduce this, we’ll fix it asap!
-c

2 Likes

Hey, this is solved in 3.0.7

2 Likes