mirror of https://github.com/pixelfed/pixelfed
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
users.storage_used only ever grew: uploads incremented it but no deletion path decremented it, so users hit the account size limit even when their real media usage was well below it. - Decrement storage_used in MediaDeletePipeline when media is removed - Add UserStorageService::increaseStorageUsed / decrementStorageUsed as the fast, symmetric hot-path counter updates (floor-based, clamped at zero) - Refactor the 6 upload call sites to use increaseStorageUsed instead of duplicated inline writes (also fixes ceil/floor drift vs the reconciler) - Add (user_id, size) covering index so per-user SUM(size) is not a full table scan (INPLACE/LOCK=NONE, skipped on sqlite) - Add user:storage:recalculate command to repair affected accounts, with a daily --stale=168 scheduled reconciler to correct any drift - Add regression tests for the pipeline and UserStorageService |
2 weeks ago | |
|---|---|---|
| .. | ||
| Controllers | 2 weeks ago | |
| Middleware | 2 weeks ago | |
| Requests | 4 weeks ago | |
| Resources | 2 weeks ago | |