@@ -14,7 +14,7 @@ This keeps the contents of the removed subtree in the forest instead of erasing
1414
1515Keeping all detached trees forever would lead to unbounded memory growth in clients,
1616and would run the risk of seriously bloating the document's snapshot size.
17- In order to avoid that, detached trees will be garbage collected (though this is not yet implemented as of April 2024) .
17+ In order to avoid that, detached trees are garbage collected.
1818How this happens is covered further down,
1919but the key idea is that most of our systems are allowed to ignore the existence of this garbage collection scheme,
2020thereby making those systems' contracts and implementations simpler.
@@ -42,7 +42,7 @@ See the [V1 Undo](./v1-undo.md) for more details.
4242When a client needs to edit the document, it can do so in a transaction.
4343Transactions are allowed to return a special value to communicate that the transaction should be aborted.
4444When that happens, any edits that the transaction had already applied to the document state need to be rolled back.
45- If some of those edits removed nodes, then those nodes need to be reintroduced into the document tree.
45+ If some of those edits happened to remove some nodes, then those nodes need to be reintroduced into the document tree.
4646
4747### After Rebasing a Local Branch
4848
@@ -103,10 +103,10 @@ This seems bad from a performance point of view because it adds a cost common op
103103Another alternative would be to keep all detached trees forever
104104(i.e., without garbage-collecting them).
105105As mentioned above, this would be bad for memory usage.
106- This memory concern could be addressed for client by using local disk storage,
106+ This memory concern could be alleviated for clients by allowing them to use local disk storage,
107107but it would still affect the size of snapshots.
108108
109- This approach seems like a decent tradeoff between these two.
109+ Our current approach seems like a decent tradeoff between these two.
110110More importantly, it paves the way to allowing us to more precisely control that tradeoff though the concept of [ undo window] ( undo.md ) .
111111
112112See also [ Collecting Usage Data] ( #collecting-usage-data ) .
@@ -166,7 +166,7 @@ What scheme we use varies depending on the layer.
166166One key requirement for identifying detached trees in changesets
167167is that peers need to use a globally consistent identification scheme:
168168if there are multiple detached trees,
169- we need to ensure that one peer can communicate to the other precisely which of them it needs to edit.
169+ we need to ensure that one peer can communicate to the other peers precisely which of the detached trees it intends to edit.
170170Additionally, if multiple peers attempt to concurrently detach the same tree,
171171then we need to ensure that all peers eventually end up with a consistent way of referring to the tree.
172172
@@ -363,7 +363,7 @@ a refresher is a copy of a detached tree that is included by a peer on a commit
363363to the sequencing service.
364364Note that this excludes commits that are internal to the peer, i.e., commits on its branches.
365365This means the inclusion of refresher can be confined to the logic that (re)submits commits to the sequencing service.
366- (See ` SharedTeeCore ` 's usage of its ` CommitEnricher ` .)
366+ (See ` SharedTeeCore ` 's usage of its ` BranchCommitEnricher ` .)
367367
368368##### Including Refreshers
369369
@@ -374,7 +374,7 @@ and whose detach operation was known to the peer\*.
374374We make this happen by adding refreshers to commits as needed immediately before they are submitted to the sequencing service.
375375Note that commits sometimes need to go through a resubmission phase,
376376so we need to ensure that the set of refreshers on such commits is updated before these commits are resubmitted.
377- (See the logic in ` SharedTeeCore ` and ` DefaultCommitEnricher ` ).
377+ (See the logic in ` SharedTeeCore ` and ` ResubmitMachine ` ).
378378
379379\* Strictly speaking,
380380a client could omit the refresher for trees for which _ both_ of the following are true:
@@ -477,4 +477,4 @@ This last option should enable us to assess the value of implementing the undo w
477477and if so, what might be a good K value for it.
478478
479479We should also measure how those costs would change
480- if we omitted them refreshers in the scenario described at the bottom of the [ Including Refreshers] ( #including-refreshers ) section.
480+ if we omitted the refreshers in the scenario described at the bottom of the [ Including Refreshers] ( #including-refreshers ) section.
0 commit comments