i created a little script to check cryosparc projects for corruption and just found that the last_accessed timestamp in the project.json is not correct or at least not really up to date. Converting it is not giving the shown date in the GUI, is the gui reading the date from that timestamp or from the database?
For example the timestamp is 1642925425575, which is if iam not mistaken Sun Jan 23 2022, but the gui shows correctly today Wed, Feb 2, 2022
The created_at timestamp in the project.json is correct though.
I noticed this when i checked created_at dates of jobs and scripted to give me a warning if the creation date is after the project last access date.
@KiSchnelleproject.json is a snapshot of database records and only gets updated during certain project updates. The idea was to limit snapshot-related load on database and filesystem, with the inconsistency you just discovered as a tradeoff. We have added snapshot frequency to our list of issues under review.
@wtempel
Thanks for the clarification! Though i would have two follow up questions on this, if you allow.
Is this kind of a one way ticket or does the database update itself, when it discovers the json files have more information? For example when i have an unrecoverable disk failure and have to resort to a few days old database backup, but the project folder was unaffected.
Are the timestamps purely “cosmetic” or are they actually checked? For example when i import a project into a new cryosparc instance, could having this older last_access date in the project.json lead to error when a created_at date of a job is newer?
Regarding your first question, CryoSPARC relies on the database for “ground truth” project metadata. An exception is that CryoSPARC reads data from project.json when importing a project.
Regarding your second question, CryoSPARC does not check during import whether a time stamp corresponds to a future date.