moodle-tool_objectfs icon indicating copy to clipboard operation
moodle-tool_objectfs copied to clipboard

[Question] Delta (objectfs fildir) vs. Filedir

Open kisonay opened this issue 3 years ago • 9 comments

I've recently upgraded to the latest version and notice it is behaving slightly different. I have it configured to transfer all files (0 bytes) and delete locally. I'm starting to get a collection of files in the filedir which are not expected.

Screen Shot 2020-08-09 at 1 23 00 PM

What is the difference between Delta (objectfs fildir), Filedir, and Marked as only in filedir?

kisonay avatar Aug 09 '20 18:08 kisonay

There are some types of interactions where it temporarily drags the file back to local. Depending on the calling code this can either come back to local temp disc or back to shared filedir, so the number may not always be zero. As for the different numbers which are the same, these are cross check from what the database thinks should be only in filedir, vs what you can actually see on disc by looking at the disc. As your numbers are the same 6032 == 6032 that looks healthy on that front

brendanheywood avatar Aug 10 '20 11:08 brendanheywood

I appreciate the explanation. Make sense. The files seem to linger for days which is what threw me off.

kisonay avatar Aug 10 '20 13:08 kisonay

I've recently upgraded to the latest version and notice it is behaving slightly different. I have it configured to transfer all files (0 bytes) and delete locally. I'm starting to get a collection of files in the filedir which are not expected.

Screen Shot 2020-08-09 at 1 23 00 PM

What is the difference between Delta (objectfs fildir), Filedir, and Marked as only in filedir?

@kisonay where do I find this screen?

prabhakaran8737 avatar Nov 14 '21 03:11 prabhakaran8737

@prabhakaran8737 Site Administration > Reports > Object Status

kisonay avatar Nov 14 '21 13:11 kisonay

@kisonay Thank you. You know how to cross check if files are from External object? Just raised a issue here https://github.com/catalyst/moodle-tool_objectfs/issues/444

prabhakaran8737 avatar Nov 14 '21 14:11 prabhakaran8737

I would like to reopen this for some further discussion. I've seen over the past year (since my original post) that my local files are constantly growing. It appears that files are no longer being uploaded to external storage. I don't see anything in the logs and the stats look ok (no discrepancies)

Screen Shot 2021-12-08 at 9 36 17 AM Screen Shot 2021-12-08 at 9 31 59 AM

Is there anyway I can debug this further to see why files are not being uploaded to external storage?

kisonay avatar Dec 08 '21 15:12 kisonay

Run the various cron tasks manually and see what they do

brendanheywood avatar Dec 09 '21 02:12 brendanheywood

Nothing looks out of the ordinary...

Execute scheduled task: Object file system download objects task (tool_objectfs\task\pull_objects_from_storage)
... started 22:52:02. Current memory use 36MB.
No candidate objects found.
... used 1 dbqueries
... used 0.49788403511047 seconds
Scheduled task complete: Object file system download objects task (tool_objectfs\task\pull_objects_from_storage)
Execute scheduled task: Object file system delete local objects task (tool_objectfs\task\delete_local_objects)
... started 22:51:02. Current memory use 35.5MB.
delete_local_object. Total time taken: 0.032189130783081 seconds. Location change summary:
duplicated -> remote. Objects moved: 1. Total size: 429.6KB. 
... used 5 dbqueries
... used 0.068505048751831 seconds
Scheduled task complete: Object file system delete local objects task (tool_objectfs\task\delete_local_objects)
Execute scheduled task: Object file system upload task (tool_objectfs\task\push_objects_to_storage)
... started 22:50:03. Current memory use 43.5MB.
No candidate objects found.
... used 1 dbqueries
... used 0.031722068786621 seconds
Scheduled task complete: Object file system upload task (tool_objectfs\task\push_objects_to_storage)

kisonay avatar Dec 09 '21 03:12 kisonay

This is really puzzling, as my local directory is now up to 13GB. The cron as stated above is not showing any errors.

I am using Digital Ocean as my storage and recently noticed a PHP Notice when I had debugging on. I created this PR to address the issue. https://github.com/catalyst/moodle-tool_objectfs/pull/454

Could this cause objects from not being transferred?

kisonay avatar Dec 15 '21 03:12 kisonay