MAX_COLLECTABLE
MAX_COLLECTABLE = 1000
Collectable frames one report lists.
Answers what the store holds now, and what deleting something would take with it.
The three reachability classes are what makes this more than a size report. An operator looking at a commit wants to know what pruning it would free, and the honest answer is almost never the bytes that commit wrote: a frame it references may be shared with fifty other commits, may be the anchor a live delta chain decodes against, or may be a dictionary a thousand frames name. So the cost of removing a commit is computed by asking what would become unreachable, never by adding up what it wrote.
Nothing here deletes anything. The explorer is a read; Compactor::prune() is the write, and
it does its own reachability walk rather than trusting a number a page rendered earlier. A store
that changed between the preview and the confirmation is the normal case on a live site.
$reachability : \Drupal\strata\Compaction\Reachability
$frames : \Drupal\strata\Cas\FrameIndexInterface
$commits : \Drupal\strata\Tree\CommitIndex
$dictionaries : \Drupal\strata\Codec\Dictionary\DictionaryStore
$segments : \Drupal\strata\Segment\SegmentReader
__construct(\Drupal\strata\Compaction\Reachability $reachability, \Drupal\strata\Cas\FrameIndexInterface $frames, \Drupal\strata\Tree\CommitIndex $commits, \Drupal\strata\Codec\Dictionary\DictionaryStore $dictionaries, \Drupal\strata\Segment\SegmentReader $segments, \Drupal\Core\Database\Connection $database) : mixed
Constructs an explorer.
| \Drupal\strata\Compaction\Reachability | $reachability | Walks the three classes. |
| \Drupal\strata\Cas\FrameIndexInterface | $frames | Supplies the store totals. |
| \Drupal\strata\Tree\CommitIndex | $commits | Supplies the commit count and per-commit sizes. |
| \Drupal\strata\Codec\Dictionary\DictionaryStore | $dictionaries | Supplies what dictionaries exist. |
| \Drupal\strata\Segment\SegmentReader | $segments | Reads which frames a commit's own segment references. |
| \Drupal\Core\Database\Connection | $database | Reads the per-realm attribution out of the journal. |
costOfRemoving(string $commit) : \Drupal\strata\Explore\RemovalCost
What removing one commit would make unreachable.
The frames that commit references are checked one at a time against every other reachability class, so a frame shared with another commit, held by a delta chain, or named by a dictionary is reported as retained rather than as freed.
| string | $commit | The commit id. |
What would be freed, what would be kept and why, and whether the walk that decided it finished.
framesOf(string $commit) : list<string>
Frames a commit's own segment references.
Only the segment's frames, not the anchor's. An anchor is shared by every commit between it and the next one, so attributing its frames to any single commit would report the same bytes as freeable several times over.
| string | $commit | The commit id. |
Frame addresses.
byRealm() : array<string,int>
Stored bytes attributed to each realm.
Attributed from the journal's pending operations and the commit labels, which is what is available locally: a frame is content-addressed and carries no realm, so the store itself cannot say which realm a given frame belongs to. The figures are therefore a breakdown of what has been captured rather than of what is on disk, and the explorer labels them that way.
Realm value keyed to bytes.