0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-23 23:18:48 -05:00
penpot/backend
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
..
dev 🔥 Clean unused stuff on dev/user.clj file 2023-12-13 11:56:20 +01:00
resources 🔥 Remove obsolete entry on devenv log config 2023-12-15 17:54:26 +01:00
scripts 📎 Add minor improvements to start-dev script 2023-12-13 14:20:07 +01:00
src Add safety mechanism for direct object deletion 2024-01-03 10:56:57 +01:00
test/backend_tests Add safety mechanism for direct object deletion 2024-01-03 10:56:57 +01:00
.gitignore ⬆️ Update yarn to 4.0.2 and start using npm workspaces 2023-11-29 10:44:36 +01:00
build.clj 🐛 Fix unexpected exception on logger caused by log4j2 plugin 2023-02-11 00:52:23 +01:00
deps.edn Update yetti and adapt for ring-2.0 2023-11-27 14:25:12 +01:00
package.json Add minor improvements to CI config 2023-12-11 17:14:20 +01:00
tests.edn
yarn.lock 🎉 Add clj fmt checking on CI and fmt fix script 2023-11-29 11:48:38 +01:00