From 5067fd6d96c323c375e72b2c104aa3bb58f261fa Mon Sep 17 00:00:00 2001 From: Lain Soykaf Date: Wed, 23 Sep 2026 08:23:13 +0400 Subject: [PATCH] docs(retention): correct what the eviction transaction guarantees --- lib/pleroma/retention.ex | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/pleroma/retention.ex b/lib/pleroma/retention.ex index 0d3993026..9d5df88bc 100644 --- a/lib/pleroma/retention.ex +++ b/lib/pleroma/retention.ex @@ -152,8 +152,9 @@ defmodule Pleroma.Retention do defp after?(id, other), do: FlakeId.from_string(id) > FlakeId.from_string(other) # Verifies the given threads against the pin rules and evicts those that - # pass, in one transaction so a local interaction landing in between cannot - # be left pointing at an evicted object. + # pass. The transaction makes a chunk all-or-nothing but does not lock the + # threads: a local interaction landing between check and delete survives, + # pins the thread from then on, and its object is refetched when needed. defp evict_threads([], _deadline, _opts), do: @empty_stats defp evict_threads(contexts, deadline, opts) do