ContentStreamPruner
class ContentStreamPruner implements ContentRepositoryServiceInterface (View source)
For implementation details of the content stream states and removed state, see {ContentStreamForPruning}.
Methods
No description
Detects if dangling content streams exists and which content streams could be pruned from the event stream
Removes all nodes, hierarchy relations and content stream entries which are not needed anymore from the projections.
Prune removed content streams that are unused from the event stream; effectively REMOVING information completely.
Details
__construct(EventStoreInterface $eventStore, EventNormalizer $eventNormalizer, SubscriptionEngine $subscriptionEngine)
No description
bool
outputStatus(Closure $outputFn)
Detects if dangling content streams exists and which content streams could be pruned from the event stream
Dangling content streams
Content streams that are not removed via the event ContentStreamWasRemoved and are not in use by a workspace (not a current's workspace content stream).
Previously before Neos 9 beta 15 (#5301), dangling content streams were not removed during publishing, discard or rebase.
{\Neos\ContentRepository\Core\Service\removeDanglingContentStreams}
Pruneable content streams
Content streams that were removed ContentStreamWasRemoved e.g. after publishing, and are not required for a full replay to reconstruct the current projections state. The ability to reconstitute a previous state will be lost.
{\Neos\ContentRepository\Core\Service\pruneRemovedFromEventStream}
void
removeDanglingContentStreams(Closure $outputFn, DateTimeImmutable $removeTemporaryBefore)
Removes all nodes, hierarchy relations and content stream entries which are not needed anymore from the projections.
NOTE: This still keeps the event stream as is; so it would be possible to re-construct the content stream at a later point in time.
To prune the removed content streams from the event stream, call {\Neos\ContentRepository\Core\Service\ContentStreamPruner::pruneRemovedFromEventStream()} afterwards.
void
pruneRemovedFromEventStream(Closure $outputFn)
Prune removed content streams that are unused from the event stream; effectively REMOVING information completely.
Note that replaying to only a previous point in time would not be possible anymore as workspace would reference non-existing content streams.