Commit graph

21 commits

Author SHA1 Message Date
flisk cb28b8f0fe updating docs: start akko first, then upgrade frontend
Some checks are pending
ci/woodpecker/pr/woodpecker Pipeline is pending
2023-02-26 23:42:28 +01:00
FloatingGhost f56e3098ef Merge branch 'delete_orphaned_activities' into develop
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending
2023-02-26 22:11:30 +00:00
ilja c1c962e1a8 Add docs for pleroma_ctl database prune_objects --prune-orphaned-activities
I also added extra info on VACUUM FULL
2023-02-26 14:41:50 +01:00
ilja 3b634dcbe7 Remove the note about activities_visibility_index
Some checks are pending
ci/woodpecker/pr/woodpecker Pipeline is pending
We renamed another index is the previous commit so that this work-around isn't needed any more
2023-02-26 14:38:14 +01:00
ilja 7695010268 Prune Objects --keep-threads option (#350)
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending
This adds an option to the prune_objects mix task.
The original way deleted all non-local public posts older than a certain time frame.
Here we add a different query which you can call using the option --keep-threads.

We query from the activities table all context id's where
    1. the newest activity with this context is still old
    2. none of the activities with this context is is local
    3. none of the activities with this context is bookmarked
and delete all objects with these contexts.

The idea is that posts with local activities (posts, replies, likes, repeats...) may be interesting to keep.
Besides that, a post lives in a certain context (the thread), so we keep the whole thread as well.

Caveats:
* ~~Quotes have a different context. Therefore, when someone quotes a post, it's possible the quoted post will still be deleted.~~ fixed in #379
* Although undocumented (in docs/docs/administration/CLI_tasks/database.md/#prune-old-remote-posts-from-the-database), the 'normal' delete action still kept old remote non-public posts. I added an option to keep this behaviour, but this also means that you now have to explicitly provide that option. **This could be considered a breaking change!**
* ~~Note that this removes from the objects table, but not from the activities.~~ See #427 for that.

Some statistics from explain analyse:
(cost=1402845.92..1933782.00 rows=3810907 width=62) (actual time=2562455.486..2562455.495 rows=0 loops=1)
 Planning Time: 505.327 ms
 Trigger for constraint chat_message_references_object_id_fkey: time=651939.797 calls=921740
 Trigger for constraint deliveries_object_id_fkey: time=52036.009 calls=921740
 Trigger for constraint hashtags_objects_object_id_fkey: time=20665.778 calls=921740
 Execution Time: 3287933.902 ms

***
**TODO**
1. [x] **Question:** Is it OK to keep it like this in regard to quote posts? If not (ie post quoted by local users should also be kept), should we give quotes the same context as the post they are quoting? (If we don't want to give them the same context, I'll have to see how/if I can do it without being too costly)
    * See #379
2. [x] **Question:** the "original" query only deletes public posts (this is undocumented, but you can check the code). This new one doesn't care for scope. From the docs I get that the idea is that posts can be refetched when needed. But I have from a trusted source that Pleroma can't refetch non-public posts. I assume that's the reason why they are kept here. I see different options to deal with this
    1. ~~We keep it as currently implemented and just don't care about scope with this option~~
    2. ~~We add logic to not delete non-public posts either (I'll have to see how costly that becomes)~~
    3. We add an extra --keep-non-public parameter. This is technically speaking breakage (you didn't have to provide a param before for this, now you do), but I'm inclined to not care much because it wasn't documented nor tested in the first place.
3. [x] See if we can do the query using Elixir
4. [x] Test on a bigger DB to see that we don't run into a timeout
5. [x] Add docs

Co-authored-by: ilja <git@ilja.space>
Reviewed-on: #350
Co-authored-by: ilja <akkoma.dev@ilja.space>
Co-committed-by: ilja <akkoma.dev@ilja.space>
2023-01-09 22:15:41 +00:00
FloatingGhost 6a333ade7f Fix task name for robotstxt
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Fixes #408
2023-01-01 18:54:08 +00:00
FloatingGhost 1121deb078 Document instance reboots
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-12-29 20:24:04 +00:00
FloatingGhost 5a405bdadf document dump_to_file and load_from_file
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-12-29 20:00:04 +00:00
FloatingGhost e66bcb64a4 Check out the latest tag on update
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-12-29 15:42:25 +00:00
Stefan 11ec4e1b8f clean-up docs to avoid mismatches in BE and FE. Clearly state that stable-versions are installed 2022-12-29 15:41:20 +00:00
Paul Dawson eb9ef59d50 Remove legacy references to FE that is not officially supported
Some checks are pending
ci/woodpecker/pr/woodpecker Pipeline is pending
2022-12-16 08:08:00 -06:00
FloatingGhost 584f99b69d fix markdown link
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-12-16 13:24:18 +00:00
FloatingGhost 48d302a60f allow disabling prometheus entirely
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending
2022-12-16 11:17:04 +00:00
FloatingGhost d1a0d93bf7 document prometheus 2022-12-16 10:24:36 +00:00
Norm 53f21489a2 Update the "Updating your instance" docs (#361)
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending
This makes them consistent with the update instructions that are in the
release announcements.

Also adds in the command to update the frontend as well.

Co-authored-by: Francis Dinh <normandy@biribiri.dev>
Reviewed-on: #361
Co-authored-by: Norm <normandy@biribiri.dev>
Co-committed-by: Norm <normandy@biribiri.dev>
2022-12-14 03:03:08 +00:00
floatingghost 09326ffa56 Diagnostics tasks (#348)
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending
a bunch of ways to get query plans to help with debugging

Co-authored-by: FloatingGhost <hannah@coffee-and-dreams.uk>
Reviewed-on: #348
2022-12-07 11:12:34 +00:00
ilja fdf33392b3 DOCS: backup restore improvements (#332)
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending
Mostly add how to speed up restoration by adding activities_visibility_index later. Also some small other improvements.

This is based on what I did on a Pleroma instance. I assume the activities_visibility_index taking so long is still true for Akkoma, but can't really test because I don't have a big enough Akkoma DB yet 🙃

Co-authored-by: ilja <git@ilja.space>
Reviewed-on: #332
Reviewed-by: floatingghost <hannah@coffee-and-dreams.uk>
Co-authored-by: ilja <akkoma.dev@ilja.space>
Co-committed-by: ilja <akkoma.dev@ilja.space>
2022-12-07 11:05:35 +00:00
floatingghost db60640c5b Fixing up deletes a bit (#327)
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Co-authored-by: FloatingGhost <hannah@coffee-and-dreams.uk>
Reviewed-on: #327
2022-12-01 15:00:53 +00:00
floatingghost 5827f7781f Add installation note about flavour, support special cases (#222)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Fixes #210

Co-authored-by: FloatingGhost <hannah@coffee-and-dreams.uk>
Reviewed-on: #222
2022-09-20 11:04:26 +00:00
floatingghost 1419eee5df Quote posting (#113)
Some checks are pending
ci/woodpecker/push/docs Pipeline is pending
ci/woodpecker/push/release Pipeline is pending
ci/woodpecker/push/test Pipeline is pending
Reviewed-on: #113
2022-07-25 16:30:06 +00:00
floatingghost d2a185c013 Documentation updates for stable release (#73)
Some checks are pending
ci/woodpecker/push/docs Pipeline is pending
ci/woodpecker/push/release Pipeline is pending
ci/woodpecker/push/test Pipeline is pending
Reviewed-on: #73
2022-07-15 12:27:16 +00:00