Fix expiry process for version meta data files#40325
Fix expiry process for version meta data files#40325JammingBen merged 1 commit intorelease-10.11.0from
Conversation
93be780 to
bfaffb0
Compare
|
Kudos, SonarCloud Quality Gate passed! |
|
If I understand correctly, you're skipping the metadata files while getting the versions, but I assume that the metadata will be removed when the version is also removed. |
Exactly, sorry, the title is a bit misleading. Version meta files get removed eventually if the corresponding versions get removed. Edit: Changed the title to be a little less misleading. |
| $files = $view->getDirectoryContent($dir); | ||
| foreach ($files as $file) { | ||
| $filePath = $dir . '/' . $file->getName(); | ||
| $isMetaFile = \substr($filePath, -\strlen(MetaStorage::VERSION_FILE_EXT)) === MetaStorage::VERSION_FILE_EXT; |
There was a problem hiding this comment.
This should work, even when the real file is something.json. I tried by creating f.json and editing it a few times. In data/username/files_versions I get:
$ ls -l f*
-rw-rw-r-- 1 phil phil 60 Aug 31 15:12 f.json.current.json
-rw-rw-r-- 1 phil phil 12 Aug 31 15:11 f.json.v1661938001
-rw-rw-r-- 1 phil phil 60 Aug 31 15:11 f.json.v1661938001.json
-rw-rw-r-- 1 phil phil 13 Aug 31 15:12 f.json.v1661938002
-rw-rw-r-- 1 phil phil 60 Aug 31 15:11 f.json.v1661938002.json
The real files end up called f.json.vnnnnnnnnnn and so their file names do not end in .json - good.
|
@jnweiger - should we switch this over to be PR to |
|
One-flow says master first, but the simpler process is release branch first, I am fine with both. |
|
Then let's do it the easy way and merge it into |








Description
This fixes the massive amount of error logs being produced during this.
Types of changes