0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-13 00:01:51 -05:00
Commit graph

39 commits

Author SHA1 Message Date
Andrey Antukh
6b552fd8a9 🐛 Don't run file-gc on deleted files 2024-04-10 15:31:49 +02:00
Andrey Antukh
a6562619a3 🐛 Fix incorrect fragment cleaning on file-gc task 2024-03-22 12:59:36 +01:00
Andrey Antukh
b718a282e0 ♻️ Add minor refactor to file migrations
Relevant changes:

- Add the ability to create migration in both directions, defaulting
  to identity if not provided
- Move the version attribute to file table column for to make it more
  accessible (previously it was on data blob)
- Reduce db update operations on file-update rpc method
2024-02-19 09:20:47 +01:00
Andrey Antukh
afd68fa09d 🐛 Properly handle fdata features on file-gc task
It also adds a schema validation process after cleaning. If file
does not validates it will be skiped.
2024-02-13 19:36:10 +01:00
Andrey Antukh
7f60946204 ♻️ Refactor exportation and duplicate mechanism
Previously the file processing was implemented 3 times using similar
approaches bug each own with its own bugs. This PR unifies the
loging to a single implementation used by the 3 operations.
2024-01-30 16:27:16 +01:00
Andrey Antukh
746d898245 Improve the db api efficiency
Mainly setup proper defaults and reduce unnecesary allocations
on every db api call.
2024-01-04 12:41:16 +01:00
Andrey Antukh
addb392ecc Add safety mechanism for direct object deletion
The main objective is prevent deletion of objects that can leave
unreachable orphan objects which we are unable to correctly track.

Additionally, this commit includes:

1. Properly implement safe cascade deletion of all participating
   tables on soft deletion in the objects-gc task;

2. Make the file thumbnail related tables also participate in the
   touch/refcount mechanism applyign to the same safety checks;

3. Add helper for db query lazy iteration using PostgreSQL support
   for server side cursors;

4. Fix efficiency issues on gc related task using server side
   cursors instead of custom chunked iteration for processing data.

   The problem resided when a large chunk of rows that has identical
   value on the deleted_at column and the chunk size is small (the
   default); when the custom chunked iteration only reads a first N
   items and skip the rest of the set to the next run.

   This has caused many objects to remain pending to be eliminated,
   taking up space for longer than expected. The server side cursor
   based iteration does not has this problem and iterates correctly
   over all objects.

5. Fix refcount issues on font variant deletion RPC methods
2024-01-03 10:56:57 +01:00
Andrey Antukh
417366d998 Reorganize fdata/pointer-map feature helpers
Mainly move all pointer-map related helpers from app.rpc.commands.files
to the the app.features.fdata namespace and normalizes codestile around
feature handling on all affected code.

This commit also comes with several features related bugifxes on the
components-v2 migration code:

- properly migrate legacy feature names on apply components-v2 migration
- start using new fdata feature related functions
- prevent generation of a ephimeral pointer on each graphic migration
  operation; on large files this caused a very noticiable overhead of
  creating a big number of completly unused pointer maps
- do persistence after validation and not before
2023-12-13 14:20:07 +01:00
Andrey Antukh
d82ebdc034 Add deduplication for file object thumbnails 2023-11-24 11:06:47 +01:00
Alejandro Alonso
1913395c47 🎉 Support for images as fills 2023-11-14 12:39:53 +01:00
Aitor
7951350762 🐛 Fix db table tagged thumbnails 2023-11-07 16:01:00 +01:00
Andrey Antukh
6f93b41920 🎉 Add features assignation for teams 2023-11-07 12:48:31 +01:00
alonso.torres
dd8480cd87 Fix problem with garbage collection 2023-11-02 11:06:30 +01:00
Andrey Antukh
496afb0f25 Merge remote-tracking branch 'origin/staging' into develop 2023-08-24 12:02:40 +02:00
Andrey Antukh
661a916a5f 🐛 Fix reference counting of file-media objects in :fill-image attr 2023-08-21 19:11:55 +02:00
Andrey Antukh
405aa66357 🎉 Add new shape & rect data structures
Also optimizes some functions for faster shape and rect props
access (there is still a lot of work ahead optimizing the rest of
the functions)

Also normalizes shape creation and validation for ensuring
correct setup of all the mandatory properties.
2023-07-11 17:27:35 +02:00
Andrey Antukh
d11b007795 Add thumbnail renderer
And integrate the dashboard thumbnails to use that service
2023-06-21 20:10:49 +02:00
Andrey Antukh
0078c0e601 🐛 Fix missing pointer persistence on file gc task 2023-05-26 08:04:01 +02:00
Andrey Antukh
e8ffcbae69 🎉 Add support for multipart upload of thumbnails
and improve the thumbnails storage to offloading it
to the storage subsystem
2023-05-05 17:00:35 +02:00
Andrey Antukh
5e89aa2726 Improve file-gc task
make it more aware of fragments referenced on changes snapshots
2023-04-26 13:28:32 +02:00
Andrés Moya
7391a4086a 🔧 Refactor delete/restore components 2023-03-27 10:39:35 +02:00
Andrey Antukh
ab3b9cba45 ♻️ Refactor storage and assets related modules
- improve internal error handling
- add more specs and more asserts
2023-02-07 18:16:55 +01:00
Andrey Antukh
8852ed815f 🐛 Fix unexpected exception on file-gc cron task 2022-11-10 14:54:50 +01:00
Andrey Antukh
76333cec26 🎉 Integrate storage/pointer-map file feature 2022-11-08 13:02:14 +01:00
Andrés Moya
687e4dce2a 🔧 Adjust code style 2022-10-04 13:50:23 +02:00
Andrés Moya
c5b875c925 Add garbage collect of deleted components 2022-10-04 13:50:23 +02:00
Andrey Antukh
886ab0e152 Improve iteration and add concat-all and fully lazy mapcat helper 2022-09-29 10:32:18 +02:00
Andrey Antukh
41134f22e9 📎 Update license header 2022-09-20 23:23:22 +02:00
Andrey Antukh
4f0cc3d0d8 Merge remote-tracking branch 'origin/staging' into develop 2022-08-12 09:45:58 +02:00
Andrey Antukh
95bb3f31af Fix all tasks related tests 2022-08-12 08:35:04 +02:00
Andrey Antukh
df00760ffa Improve file-xlog-gc task 2022-08-11 17:31:32 +02:00
Andrey Antukh
ec2a3c0de1 Improve the file-gc task logging and params 2022-08-11 17:31:32 +02:00
Andrey Antukh
6ee6e5e23e Improve logging on gc-touched storage task 2022-08-11 17:31:32 +02:00
Andrés Moya
54e0071c9c 🎉 Scaffolding to write unit tests of common types 2022-07-29 09:29:24 +02:00
Andrés Moya
bdcbe46d0d ♻️ Move component instantiation to new types module 2022-07-29 09:29:24 +02:00
Andrey Antukh
46d075611d ♻️ Adapt media & fonts handling to new tmp service
And storage backend changes
2022-06-22 11:39:57 +02:00
alonso.torres
8cd7f61150 🐛 Fix problem with duplicated ids for thumbnails 2022-05-09 15:37:47 +02:00
Andrey Antukh
20d3251a93 🎉 Add generic file object thumbnail abstraction
As replacement to the file frame thumbnail mechanism
2022-04-05 13:23:39 +02:00
Andrey Antukh
2832736826 🎉 Add garbage collection task for file thumbnails
And additionally, rename the current task to file-gc
to match the real purpose of the task.
2022-03-28 17:24:52 +02:00