Maps to: CMU 15-440/640 Spring 2026, learning outcomes “caching and disconnected operation; resolving conflicts”, “optimism”, “pessimistic vs optimistic replication” and “exploiting low bandwidth”; the readings:
- Kistler and Satyanarayanan, Disconnected Operation in the Coda File System (TOCS 1992);
- Satyanarayanan, The Evolution of Coda (TOCS 2002);
- Kumar and Satyanarayanan, Log-Based Directory Resolution in the Coda File System (1993);
- Kumar and Satyanarayanan, Flexible and Safe Resolution of File Conflicts (USENIX 1995).
Sources besides the readings:
- D. S. Parker et al., Detection of Mutual Inconsistency in Distributed Systems (IEEE TSE 1983) — version vectors;
- S. Davidson, H. Garcia-Molina and D. Skeen, Consistency in Partitioned Networks (Computing Surveys 1985);
- L. Mummert, M. Ebling and M. Satyanarayanan, Exploiting Weak Connectivity for Mobile File Access (SOSP 1995);
- D. Terry et al., Managing Update Conflicts in Bayou (SOSP 1995);
- Y. Saito and M. Shapiro, Optimistic Replication (Computing Surveys 2005).
The slides are not public; this is not a transcript. Every number not attributed to a paper comes from
code/lecture22/, run on the author’s machine (Apple M4 Pro, macOS, Python 3.13 and 3.9). Everything is simulated, seeded and deterministic. Code:code/lecture22/. Reading time: ~100 minutes, plus ~1 to run the demos.
0. How to read this lecture
0.1 Learning goals
After this lecture you should be able to:
- State the pessimistic vs optimistic choice in replica control, the evidence that makes optimism viable for file systems, and when it is the wrong choice.
- Describe Coda’s client states (hoarding, emulation, reintegration) and what each must achieve.
- Explain hoarding: priorities, hoard profiles, hoard walks, and why a profile can hurt.
- Explain the client modification log and its optimizations, and what makes them safe.
- Detect conflicts with store ids and version vectors, and say where each is correct.
- Apply directory semantics to decide which partitioned updates conflict.
- Describe log-based directory resolution between servers, and application-specific resolvers for files.
- Explain what changes on a weak link: trickle reintegration, the aging window, rapid cache validation.
0.2 Prerequisites and scope
- Prerequisites:
- Lecture 5: AFS, whole-file caching, callbacks, volumes;
- Lecture 7: cache consistency, leases;
- Lecture 10: mobile clients and weak links;
- Lecture 17: RVM;
- Lectures 19–21: pessimistic replication, quorums, consensus.
- Scope: Coda’s design as described in the four readings, re-implemented as a toy (a file system of directories and files, no data blocks, no security). Isolation-only transactions and translucent caching are covered briefly. Weakly consistent systems in general (Bayou, CRDTs) appear in §9 for comparison.
0.3 Section → code map
| Section | Idea | Demo in code/lecture22/ |
|---|---|---|
| §1 | why optimism | 01_why_optimism.py, workload.py |
| §2 | Coda’s design; hoarding | 02_hoarding.py, coda.py |
| §3 | emulation and the CML | 03_cml.py |
| §4 | detecting conflicts | 04_version_vectors.py, vv.py |
| §5 | reintegration | 05_reintegration.py |
| §6 | server replication, directory resolution | 06_directory_resolution.py, resolve.py |
| §7 | application-specific resolvers | 07_resolvers.py |
| §8 | weak connectivity | 08_weak_connectivity.py |
0.4 Notation
- Venus: Coda’s client cache manager. VSG: a volume’s storage group, the set of servers holding it. AVSG: the accessible VSG, the subset a client can currently reach.
- First-class replicas live on servers; second-class replicas are client cache copies.
- fid: an object’s permanent identifier. Store id: the identifier of the last update to an object, a pair (who, counter).
- CML: the client modification log, called the “replay log” in 1992.
- Lab World: our synthetic research group, generated by
workload.py:- 8 users in two projects;
- home directories with papers, notes and mail;
- project source files, each with an owner;
- shared tools.
The knob
shareis the probability that a write goes to someone else’s file.
1. Why optimism (demo 01)
1.1 Two families of replica control
When a network partition separates replicas, a replication protocol must choose (Davidson, Garcia-Molina and Skeen):
- Pessimistic: prevent conflicting updates. Allow writes in at most one partition, the one with a majority (Lectures 19–21), or the one holding a token. Consistency is guaranteed; availability is lost in every other partition.
- Optimistic: allow reads and writes everywhere, and detect and resolve conflicts after the fact. Availability is complete; consistency is temporarily lost, and some conflicts need a human.
For a disconnected laptop the partition is between one second-class replica, the cache, and all its first-class ones. Kistler and Satyanarayanan go through the pessimistic options and find each wanting:
- Acquire control before disconnecting. The client takes exclusive or shared control of the objects it might use. That is feasible for a planned disconnection but not an involuntary one, and the system cannot know who will need what, or for how long.
- Hold it until reconnection. Fine for minutes, unacceptable for days. A client holding shared control blocks every update elsewhere; with exclusive control, others cannot even read. A whole community waits on one laptop in a car.
- Time-limited control (leases, Lecture 7). This avoids the indefinite wait but defeats the purpose: once the lease expires, the disconnected client loses access even to files nobody else wants, and updates made under it must be discarded.
Optimism costs machinery instead: conflict detection, automatic resolution where possible, and confinement plus evidence for manual repair. Coda bet on optimism because Unix users rarely write-share files.
1.2 The evidence (demo 01 Part A)
Kistler and Satyanarayanan instrumented CMU’s AFS servers (over 400 users) for twelve months. On every modification they recorded whether the modifier was the object’s previous writer, and how long ago the previous modification had been:
- over 99% of all modifications were by the previous writer;
- the chance that two different users modified the same object less than a day apart was at most 0.75%;
- excluding system files (whose sharing they attribute to operators changing shifts), over 99.5% were by the previous writer, and fewer than 0.4% followed another user within a week.
Lab World is calibrated to this. With share = 0.01, 20 days of 8 users give 99.20% of modifications by the previous writer and 0.69% following another user within a day (0.80% within a week). With share = 0.05 the numbers become 95.95% and 3.61%.
1.3 What each policy costs (demo 01 Parts B, C)
User u1 disconnects at 9:00 on 15 different days while the other seven keep working. Averages per disconnection, with share = 0.01:
| disconnected for | u1’s updates | pessimistic, read-only: refused | pessimistic, tokens on yesterday’s files: others refused | optimistic: conflicts |
|---|---|---|---|---|
| 1 hour | 24 | 24 | 0.0 | 0.00 |
| 9 hours | 246 | 246 | 3.2 | 1.00 |
| 72 hours | 741 | 741 | 9.0 | 3.07 |
A pessimistic policy charges someone: either the disconnected user (all 246 updates of a day refused) or the others (3.2 of their updates refused per day). Optimism refuses nothing, and in a disconnected day produced about one conflicting file. These were mostly project source files that a teammate also touched; on 7 of the 15 days there were none.
The bet depends on the workload:
| share | conflicts per disconnected day | days with at least one conflict |
|---|---|---|
| 0.01 | 1.00 | 8 / 15 |
| 0.05 | 4.53 | 14 / 15 |
| 0.10 | 8.20 | 15 / 15 |
| 0.30 | 16.20 | 15 / 15 |
The lesson is Satyanarayanan’s own (2002, §12.1): optimistic replication is not always applicable. Where consistency is paramount, or where sharing is dense (an online transaction system, a bank account), pessimistic replication remains the right tool. But one should not reject optimism out of fear; for personal and loosely shared data, high availability outweighs the occasional conflict.
2. Coda’s design, and hoarding (demo 02)
2.1 The pieces
Coda descends from AFS (Lecture 5) and keeps its model of trust: a few trusted servers and many untrusted clients. On top of that it adds two availability mechanisms:
- Server replication: a volume has read-write replicas on several servers (the VSG). Updates go to all reachable ones (the AVSG) in parallel. This preserves quality: data on servers is persistent, backed up, secure.
- Disconnected operation: when the AVSG is empty, Venus serves requests from its cache alone. This trades quality for availability. It is a last resort, and server replication exists to make it rarer.
Several AFS choices turn out to matter more for disconnection than for performance:
- Whole-file caching. A cache miss can happen only at
open, never in the middle of areadorwrite. That gives disconnected operation a simple failure model: a program either gets the whole file or an error at open. - Callbacks. The server promises to notify a client when its cached copy changes, so a valid cache needs no checking.
- A user-level Venus, with a tiny in-kernel cache in front of it. It was easier to build and debug; a kernel implementation would have been faster.
The distinction between first-class (server) and second-class (cache) replicas runs through the whole design. In the paper’s analogy, clients are like appliances, turned off at will, with small disks that are not backed up; servers are like public utilities. A second-class replica is useful only by periodic revalidation against a first-class one.
2.2 Three states
Venus is in one of three states per volume:
- Hoarding (connected): serve from the cache, write through to the servers, and, crucially, keep in the cache what will be needed if the network disappears.
- Emulation (disconnected): act as a pseudo-server, performing access checks and generating fids for new objects. Log every update. A miss is an error.
- Reintegration (on reconnection): ship the log, have the servers replay it, then return to hoarding.
Coda later added a fourth, write-disconnected state: reads are served from the servers while updates are logged and trickled back (§8). Application-specific resolvers also run in it, which gives them transactional execution (§7).
2.3 Hoarding
What should the cache contain when the network goes away? Recently used files, as in any cache, but also files the user will need and has not touched lately. Kistler and Satyanarayanan note that people who carry laptops already predict their needs: they copy what they will work on before a trip. So Coda asks for help.
- A hoard database (HDB) per workstation lists pathnames with priorities, built from hoard profiles: small scripts a user, a project or an application maintainer writes. A suffix
ccovers the children anddall descendants;+includes future ones too. - Current priority of a cached object = a function of its hoard priority and its recent use; the lowest is evicted first.
- Hierarchical cache management: path resolution while disconnected needs every ancestor directory cached, so directories with cached children get infinite priority, which forces eviction bottom-up.
- Hoard walks every 10 minutes, or on request before a planned disconnection, restore equilibrium: no uncached object has a higher priority than a cached one. A walk first re-expands HDB entries on the servers, so new children of a
d+directory are found, then fetches and evicts. - Callback breaks while hoarding:
- a file whose copy changed is purged, to be refetched at the next walk or reference;
- a directory is kept but marked suspicious, because a stale directory is more useful than none if a disconnection comes first.
2.4 What hoarding achieves (demo 02)
Venus replays user u1’s trace: 5 connected days with hoard walks, then a disconnected day of 425 operations. “Failed” counts operations that needed an uncached object.
| cache | LRU only | focused profile (1.8 MB) | broad profile (12.4 MB) | stale profile (0.8 MB) |
|---|---|---|---|---|
| 1 MB | 49 (15 objects) | 23 (9) | 79 (18) | 81 (20) |
| 2 MB | 15 (6) | 15 (5) | 10 (2) | 47 (13) |
| 4 MB | 4 (2) | 4 (2) | 0 | 4 (2) |
| 16 MB | 4 (2) | 4 (2) | 0 | 4 (2) |
The profiles:
- focused: u1’s papers, u1’s own modules, the headers and u1’s six favourite tools;
- broad: all of u1’s home directory, every project file, every tool;
- stale: written for the other project.
Three lessons, the first of which surprised the author:
- Advice costs space. With 1 MB, the broad profile did worse than no profile at all (79 against 49). Hoarded objects that are never used outrank recently used unhoarded ones and crowd out the working set. The focused profile, which nearly fits, did best (23). A hoard profile is a way to spend a cache that is too small, and spending it on the wrong things hurts.
- Some misses need advice, not space. Even with 16 MB, LRU failed 4 operations on 2 objects u1 had never opened before: teammates’ source files, the same rare cross-edits that cause conflicts. Only the broad profile, which named them, avoided them.
- A stale profile is worse than none while space is short (81 against 49 failures with 1 MB; 47 against 15 with 2 MB), and harmless once everything fits.
Kistler and Satyanarayanan’s trace-driven simulations put the disk needed for a typical 1991 workday at 50–60 MB; their 100 MB disks sufficed for one to two days of disconnection.
3. Emulation and the client modification log (demo 03)
3.1 What the log must contain
While emulating, Venus records enough to replay each update at the servers. It keeps a per-volume log of mutating operations; each record holds the call’s arguments and the version state (store ids) of every object the call referenced. The log, the cache’s metadata and the hoard database are kept in RVM (Lecture 17), so that a laptop can shut down mid-disconnection and continue. Two RVM features matter here:
- Venus flushes RVM’s log rarely while hoarding, since the servers have the data, and often while emulating, since a crash then loses the only copy. This is the no-flush, bounded-persistence trade-off of Lecture 17.
- Using transactions spared Venus the ad-hoc recovery code that metadata kept in plain Unix files would have needed.
When the cache fills with modified files, or the log’s space is used up, the 1992 implementation simply refused further updates.
3.2 The optimizations
A naive log grows with every system call. Coda’s optimizations shrink it:
- A store supersedes earlier stores of the same file. Whole-file caching means a close after writing installs a new copy, so only the last one matters. The record points at the cached copy rather than containing it.
- Overwriting cancels: an unlink cancels the file’s earlier stores.
- Inverse operations cancel each other: a
create,stores and anunlinkof a temporary file leave nothing; so do amkdirand itsrmdir. Satyanarayanan’s example is an editor that saves by creating a new file, copying the data, deleting the old version and renaming: the create, store and unlink of the superseded copy can all be eliminated. coda.pyalso folds a rename into the create of a locally created file.
Why it matters:
- a smaller log saves disk space, which is precious while disconnected;
- it shortens reintegration;
- it loads the servers less;
- above all, it saves bandwidth on a weak link (§8).
3.3 Measurements (demo 03)
| run | records | log size | data to send |
|---|---|---|---|
| Lecture 5’s mini Andrew benchmark, disconnected | 225 | 65.7 KB | 387 KB |
| Andrew benchmark (Kistler 1992, Table I) | 223 | 65.0 KB | 1,141 KB |
| u1’s working day, raw log | 250 | 73.0 KB | 4,495 KB |
| u1’s working day, optimized log | 44 | 12.8 KB | 528 KB |
- Andrew benchmark. Our mini Andrew benchmark produced 225 records (7 mkdir, 109 create, 109 store), against 223 for the real one. The log size matches by construction, because our 292-byte record is taken from their table; the record count is the independent match. The benchmark writes every file once, so the optimizer finds nothing to cancel.
- A working day of editing with checkpoints and compiling went from 250 records to 44, and the data to send fell from 4.5 MB to 528 KB:
- editor checkpoints vanish;
- each recompilation cancels the whole history of the previous object file;
- repeated saves collapse into their last store.
- Log versus data. The optimized log took 0.09% of the 14.1 MB cache; the paper reports logs of typically a few percent. What costs space and bandwidth is the data the log points to.
Kistler’s Table I also gives reintegration times on 1991 hardware: about 43 s for the Andrew benchmark and 52 s for compiling Venus, both after sessions of continuous work with no think time. In their experience, a few hours of typical editing and program development reintegrated in about a minute.
3.4 Optimizations must not change the outcome
Rewriting the log is only allowed if the server ends up exactly where the raw log would have taken it. Demo 03 Part C checks this on 3,000 random sessions (creates, writes, removes, renames, mkdirs, rmdirs on a small tree). Optimized and raw logs left identical servers every time, with no conflicts.
The check was not a formality. While building coda.py, a 20,000-session version of it found four bugs:
- folding a rename into a create moved a name binding back in time, before the old name’s removal;
- folding a second rename left the first one dangling;
rename(x, x)deleted the file;- cancelling a file’s first store left the surviving store expecting the client’s own intermediate store id.
The last one shaped the design. A record now carries the store id the client saw from the server before its first local change. The server does not re-check objects already changed by earlier records of the same log.
4. Detecting conflicts: store ids and version vectors (demo 04)
4.1 Two mechanisms for two situations
Coda detects conflicts syntactically first, from version information, and invokes semantic machinery only when that indicates a possible conflict (Satyanarayanan 2002, §5.1). The common case of no conflict stays fast. It uses two kinds of version information:
- Store ids, between a client and its servers. Every object carries the store id of its last update. A disconnected client’s record says which store id it saw. At reintegration, equality means nobody else changed the object, so the update applies; inequality means a possible conflict. This works because the client knows exactly which version it started from.
- Version vectors, between servers. In server replication each replica of an object carries a Coda version vector with one counter per server in the VSG. An update is performed at every member of the AVSG (phase COP1); then the client distributes the update set, the list of servers that succeeded (phase COP2). Each of those servers’ counters is incremented. Replicas that were in different partitions then have vectors neither of which dominates.
Coda’s update protocol is not two-phase commit and never blocks. If a failure interrupts it, the client conservatively assumes the servers that did not answer were not updated. The worst outcome is a false conflict, detected later; no update is ever lost.
4.2 What a version vector buys (demo 04 Part A)
Every history of up to 6 events (an update at a replica, or a sync where one replica pulls another’s version) on three replicas, 597,870 histories, judged against the truth of which updates each version contains:
| scheme | lost an update | lost a causally newer version | false conflict | missed conflict |
|---|---|---|---|---|
| version vector | 0 | 0 | 0 | 0 |
| last writer wins | 68,736 | 0 | 0 | 118,776 |
| last writer wins, clocks skewed ±1.5 steps | 69,153 | 462 | 0 | 118,776 |
| one version counter | 68,736 | 0 | 0 | 118,776 |
| store id only (“same or different”) | 0 | 0 | 421,092 | 0 |
(Each count is the number of histories in which it happened at least once.)
- Version vectors are exact: their comparison is the happened-before relation on updates (Lecture S1). A vector that dominates may be copied; vectors that are concurrent are a conflict.
- Last writer wins never reports a conflict, so it silently discards one side of a concurrent update. With skewed clocks it can even overwrite a causally later version with an older one that carries a larger timestamp.
- Store ids alone can say “same” or “different” but not “newer”. Between peers they report a conflict whenever one replica is simply behind. That is why Coda uses them only where the question does not arise.
Vectors grow with the number of writers: 12 bytes for 3 servers, but 40 KB per object if 10,000 clients were replicas. Giving counters only to the few first-class replicas keeps them small. This is one more reason for Coda’s two-class design.
5. Reintegration (demo 05)
5.1 The replay
Reintegration happens one volume at a time; update activity in that volume is suspended until it completes. Venus first obtains permanent fids for new objects; usually it has preallocated a supply while hoarding. It then ships the log to the AVSG. Each server replays it in a single transaction:
- parse the log, begin a transaction, lock every referenced object;
- validate and execute each operation:
- validation means conflict detection, integrity, protection and disk-space checks;
- a store only creates a shadow file and updates metadata;
- back-fetch the file contents from the client;
- commit and release the locks.
If reintegration fails, Venus writes the log to a local replay file, purges the corresponding cache entries, and gives the user a tool to inspect the replay file and replay it selectively.
Only write/write conflicts are considered. Read/write conflicts are ignored because Unix itself offers no atomicity beyond a single system call. Coda’s later isolation-only transactions addressed them, an optimistic concurrency control mechanism in Kung and Robinson’s style; that effort is now a defunct experimental branch.
5.2 Directory semantics
A file’s conflict test is simple: did someone else store it? A directory is different. Two users who add different names to the same directory have changed its store id, yet their updates commute. Coda, following Locus, applies Unix directory semantics, and Kumar and Satyanarayanan list the conflicting cases:
- name/name: two different objects created with the same name;
- remove/update: an object removed on one side and updated (or, for a directory, given new entries) on the other;
- update/update: a directory’s attributes, such as its access list, changed on both sides;
- rename/rename: an object moved to different places on both sides.
The first three come from Guy’s analysis of Locus. The fourth exists because Coda’s naming is a strict tree.
Demo 05 Part A puts this to an exhaustive test. A disconnected client does X, another client does Y at the server, for all 100 pairs of 10 operations. The ground truth is whether X and Y commute: applied by path in either order, do both succeed and give the same tree?
| checker | conflict exactly when the pair does not commute | false conflicts | non-commuting pairs accepted |
|---|---|---|---|
| Coda’s directory semantics | 94 of 100 | 0 | 6 |
| store ids only | 68 of 100 | 30 | 2 |
- Store-id checks alone raised 30 false conflicts. Any change to a directory, such as a new name, a removal or a rename next door, changes its store id.
- The 6 accepted non-commuting pairs are deliberate. Coda names objects by fid, so a store reaches a file even if the other side renamed it, and two removals of the same object are one removal. A user would choose these outcomes, although no path-by-path order yields them.
5.3 What one conflict does to the rest (demo 05 Part B)
Two teammates disconnected for a working day while the others stay connected; u1 reintegrates first, then u2. Over 5 days:
| share | reintegration | records | applied | conflicts | dependent failures | reintegrations aborted |
|---|---|---|---|---|---|---|
| 0.01 | any of the three below | 355 | 355 | 0 | 0 | 0 |
| 0.01 | store ids only | 355 | 128 | 136 | 91 | 0 |
| 0.10 | abort the volume on any conflict (1992) | 415 | 182 | 8 | 0 | 8 of 10 |
| 0.10 | fail only the conflicting objects | 415 | 369 | 24 | 19 | 0 |
| 0.10 | store ids only | 415 | 118 | 176 | 121 | 0 |
The 1992 design aborted the whole volume’s reintegration on a single file conflict. At 10% sharing that sent 8 of 10 days’ work to replay files. Failing only the conflicting objects, and the later records that depend on them, kept 369 of 415 records. Later Coda handles conflicts per object:
- a conflicting object appears as a dangling symbolic link (whose value is its fid), which even poorly written programs handle as a failed open;
- a repair tool exposes the replicas as a directory, steps through the log, and replays or discards each record;
- the volume stays disconnected until the user has repaired its local–global conflicts, so the repair context does not change underneath.
At 1% sharing these particular days had no conflict at all. Demo 01’s average of about one per day includes days like these.
6. Server replication and log-based directory resolution (demo 06)
6.1 Replicas that diverge
Server replication brings its own partitions. If S1 is cut off from S2 and S3, clients on each side update their reachable replicas. Coda’s read protocol is read-one-data, read-all-status, write-all: fetch the data from a preferred server, and version information from every AVSG member. A mismatch triggers resolution. Resolution is lazy: only the objects a system call needs are resolved, on demand. This avoids recovery storms after a partition heals; the drawback is that unresolved updates can linger. It is triggered by clients but performed by servers: resolving a directory may require touching parts of the tree the client’s user has no rights to.
6.2 Resolution from logs
Kumar and Satyanarayanan’s central result is that logging directory updates makes directory resolution simple and efficient. Each volume replica keeps a resolution log, physically one per volume and logically one per directory. The log lives in RVM and is updated in the same transaction as the directory itself. To resolve a directory:
- Each replica’s log is scanned backward to find the latest common entry (LCE): the most recent update present in every log. It marks the last moment the replicas were identical. The update protocol guarantees an update succeeds only at replicas that are already identical, so the entries after the LCE are exactly the partitioned updates.
- Each replica collects the entries it missed from the others. It drops duplicates, keeps each server’s order (a
mkdir foomust precede itsrmdir foo) and discards inverse pairs. - It performs the rest in one transaction, checking the semantic rules of §5.2. Any violation marks the directory in conflict at all replicas, to be repaired by hand.
A four-phase, coordinator-driven protocol runs this across servers: lock, collect and merge logs, distribute logs and compensate, unlock. It is made idempotent rather than transactional, to avoid blocking if the coordinator fails. Lecture 18’s 2PC would block.
6.3 How much work is a merge? (demo 06 Part A)
Kumar and Satyanarayanan’s benchmark work unit is 104 directory updates:
- 20 creates (14 files, 4 subdirectories, a link, a symbolic link);
- an editor checkpoint (create, then remove) for each of the 14 files;
- a compilation for each: create
foo..c, createfoo..o, renamefoo..otofoo.o, removefoo..c.
| work done at | replicas | updates | compensations | cancelled | compensations / update |
|---|---|---|---|---|---|
| one replica | 2 | 1,040 | 480 | 560 | 0.46 |
| one replica | 3 | 1,040 | 960 | 1,120 | 0.92 |
| one replica | 4 | 1,040 | 1,440 | 1,680 | 1.38 |
| all replicas | 3 | 3,120 | 2,880 | 3,360 | 0.92 |
| all replicas | 4 | 4,160 | 5,760 | 6,720 | 1.38 |
- More than half the partitioned work cancels. 56 of every 104 entries are inverse pairs: every checkpoint and every temporary
..cis a create and a remove of the same object. - Every replica ended identical, with no conflict.
- Cost. In operations, a replica redoes 0.46 of the others’ updates. In time, resolution is cheaper than the original work, since it involves no client round trips and runs in one transaction per site. The paper measured resolution at no more than 10% of the time of the partitioned work, even with over 1,000 updates on each of 4 replicas. The cost depends on the amount of partitioned activity and the number of replicas. Kumar and Satyanarayanan contrast this with Ficus, which infers updates from final states, so that its cost depends on directory size too.
6.4 Conflicts, and finite logs (demo 06 Parts B, C)
| partitioned updates on {S1} | {S2, S3} | verdict |
|---|---|
| create a.c / create b.c | merged |
| create x / create x | name/name |
| remove f / store f | remove/update |
| rename f → g / rename f → h | rename/rename |
| rename f → d/f (another directory) | rename/rename (reported, not resolved) |
| setattr / setattr | update/update |
| create t, remove t / nothing | merged (the pair cancels) |
Cross-directory renames, fewer than 3% of directory updates in their traces, were detected but not resolved transparently in 1993.
Logs are finite. Coda lets a full log wrap around and overwrite its oldest entries, so updates continue. If the LCE is overwritten, any later resolution of that directory must report a conflict.
| log entries per directory | 104 partitioned updates | 416 | 1,664 |
|---|---|---|---|
| 64 | manual repair | manual repair | manual repair |
| 256 | resolved | manual repair | manual repair |
| 1,024 | resolved | resolved | manual repair |
The larger the log, the rarer the manual repair, a trade-off the paper considers essential in any practical system. Their traces (44 volumes, 10 weeks) showed:
- logs grow by about 94 bytes per hour on average;
- over 94% of hours stay under 1 KB, and over 99.5% under 10 KB;
- the worst hour was 141 KB, once.
Their rule: a partition of N hours needs about 10(N + 1) KB per volume, so about (N + 1) MB for a server with 100 volumes. Lab World’s logs grew by 228 bytes per volume-hour, the same order; its busiest hour added only 3 KB, since synthetic users have no bursts like unpacking a source tree.
7. Application-specific resolvers (demo 07)
7.1 Why the application must help
Some files are write-shared by design. Kumar and Satyanarayanan’s examples:
- an executive’s calendar kept by her and her secretary;
- a couple’s joint checkbook.
When both replicas changed, the system sees two different byte streams. Only the calendar program knows that a meeting at 8 and one at 10 are compatible in one office, but not in New York and San Francisco. Coda therefore runs application-specific resolvers (ASRs). The goal is to reduce the frequency of manual repair, not eliminate it. Conflicts in such domains also happen without computers, and people cope.
7.2 What can go wrong in a merge (demo 07 Part A)
The calendar is stored as records, as in the application they used:
- inserting appends a record;
- deleting invalidates one;
- changing invalidates the old record and appends a new one.
Starting from appointments a1–a3, each side makes up to two changes; there are 625 combinations:
| merge | keeps every record-level intention | loses an insertion or change | resurrects a deletion |
|---|---|---|---|
| keep the later file | 48 of 625 | 475 | 408 |
| union of records, without tombstones | 97 of 625 | 0 | 528 |
| union with tombstones (their merge-cal) | 625 of 625 | 0 | 0 |
A merge that only sees the live records cannot tell “deleted here” from “inserted there”: a record deleted on one side is still present, unchanged, on the other. Their calendar resolver keeps deleted records in its index precisely so that it can tell recent deletions from new insertions. In the 384 combinations where both sides touched the same appointment, the tombstone merge decides nothing silently:
- two changes leave both new versions;
- a change against a deletion leaves the changed one. The user sees the clash and settles it.
7.3 How Coda runs untrusted resolvers
ASRs are ordinary programs, possibly buggy or malicious, run automatically when a file with divergent replicas is accessed. The design choices (Kumar and Satyanarayanan 1995):
- On the client, not the server. Servers run only trusted code, and clients have the cycles and the path-resolution machinery.
- Lazily, on access. This avoids storms after a partition, but the triggering system call pays the whole cost.
- Selected by rules in a
ResolveFilethat looks like a Makefile:- rules apply to the subtree below the file’s directory, overridden lower down;
- each rule has an object list with wildcards, a dependency list (files whose replicas must not be diverging) and commands with macros.
For example,
*.dvidepends on$*.texand is regenerated by running LaTeX.
- Replicas exposed to the resolver by “exploding” the file into a fake directory with one entry per replica.
- Safety:
- the resolver runs with the triggering user’s privileges, only from trusted directories if the user so chooses, or never;
- execution is limited to two minutes, and invocation to once per five minutes per object, against resolvers that loop or claim success without fixing anything;
- only one ASR runs at a time per client, and optimistic concurrency control between clients means only the first to finish commits;
- atomicity: Venus runs the ASR’s volume write-disconnected, so its updates are logged and either reintegrated together or purged.
The measured overhead of invoking and selecting an ASR was half a second to a second on a 1995 workstation, 571 ms at best, less than most resolvers’ own work.
Demo 07 Part B: a *.o resolver that depends on the corresponding .c regenerated m.o when only the object files diverged, and refused when m.c itself was in conflict. Part C: a resolver that crashed half-way and one that never finished (stopped by its step budget) both left the replicas exactly as they were, with the conflict flagged.
8. Weak connectivity (demo 08)
8.1 Between connected and disconnected
A modem in a hotel room, an early wireless link. Satyanarayanan’s principles for such links:
- Don’t punish strongly connected clients: no protocol in which servers synchronously wait for a weak client.
- Don’t make life worse than when disconnected.
- Do it in the background if you can.
The result adapts across nearly four orders of magnitude of bandwidth, from a few kilobits to 100 Mb/s. It needed two mechanisms.
8.2 Trickle reintegration and the aging window (demo 08 Parts A, B)
Updates propagate continuously in the background, from the write-disconnected state. A connected client that updates a file awaiting reintegration simply breaks the weak client’s callback; a conflict, if any, is handled as after a disconnection. Two parameters:
- Chunk size C: about 30 seconds of transmission, so the link is never saturated for long. That is 36 KB at 9.6 kb/s, 240 KB at 64 kb/s, and 7.68 MB at 2.048 Mb/s (the paper’s “7.7 MB at 2 Mb/s” corresponds to an E1 line). A large file goes in fragments and is applied when complete.
- Aging window A: a record may leave only after waiting A seconds in the log, 600 s by default from trace analysis. A record shipped too early can no longer be cancelled by a later operation, and the log optimizations lose their bite.
u1’s working day over a weak link:
| link | A | records sent | bytes sent | link busy | exposure: median | 95th pct |
|---|---|---|---|---|---|---|
| 9.6 kb/s | 0 s | 226 | 2,931 KB | 8% | 9 s | 65 s |
| 9.6 kb/s | 60 s | 180 | 2,876 KB | 7% | 70 s | 125 s |
| 9.6 kb/s | 600 s | 131 | 1,207 KB | 3% | 610 s | 648 s |
| 9.6 kb/s | 3,600 s | 108 | 1,157 KB | 3% | 3,611 s | 3,661 s |
| 64 kb/s | 0 s | 228 | 2,932 KB | 1% | 2 s | 10 s |
| 2.048 Mb/s | 0 s | 228 | 2,932 KB | 0% | 0 s | 0 s |
- Ten minutes of waiting more than halved the bytes (2,931 KB → 1,207 KB): in ten minutes most checkpoints and superseded saves cancel each other in the log.
- The price is exposure: the time an update exists only on the laptop, at risk from theft, loss or damage. Ten minutes on median with A = 600 s.
- An hour’s window saved little more (1,157 KB) for six times the exposure.
8.3 Rapid cache validation (demo 08 Part C)
After a disconnection callbacks are void, and every cached object must be validated before use: one round trip each, painful on a modem. Coda’s fix tracks versions at two granularities:
- each server keeps a volume version stamp that changes with any update in the volume;
- clients record volume stamps after a hoard walk, when all their objects are known to be valid;
- on reconnection, one batched call validates the volume stamps, and only volumes whose stamps changed need object-by-object checks;
- validating a stamp also re-establishes a volume callback.
Mummert, Ebling and Satyanarayanan measured volume validation succeeding over 97% of the time, each success saving over 50 object validations.
In demo 08, u1’s 145 cached objects took 123 round trips with stamps instead of 145 after an hour away (43 s instead of 51 s at 300 ms per round trip), and 127 after a day. The saving was small because u1’s cache was dominated by shared volumes that others change every day:
- changed: the project (77 objects), the tools (45) and a co-author’s directory (4);
- unchanged: u1’s own volume, which held only 19 objects.
The payoff of a coarse version stamp depends on how private the cached data is.
8.4 Translucency
Weak connectivity broke transparency: users were unpleasantly surprised by long cache-miss delays and slow propagation. Coda made caching translucent:
- a small dashboard shows the cache’s state in green, yellow or red;
- a user patience model decides whether to ask the user before a long fetch. The patience threshold grows with the file’s hoard priority, modelled as an exponential τ = α + β·e^{γP} with α = 6 s, β = 1, γ = 0.01, on the conjecture that patience, like perception, is logarithmic. Below the threshold misses are served transparently, above it the user is asked.
9. Coda in context
- Locus and Ficus (UCLA) pioneered optimistic replication in Unix file systems and identified version vectors. Coda found that their peer-to-peer, small-network assumptions did not carry over to a large client-server system, and borrowed little beyond the idea itself.
- Bayou (Xerox PARC, 1995) is the purely semantic end of the spectrum. Every write carries a dependency check and a merge procedure, written by the application, and servers converge by anti-entropy to a primary-chosen commit order. Coda chose a hybrid: syntactic detection first, semantic resolution only when needed.
- Modern descendants:
- mobile sync frameworks, file synchronizers (Dropbox’s conflicted copies are Coda’s “keep both and tell the user”) and Git, whose three-way merge is a user-driven resolver over an explicit history;
- CRDTs (conflict-free replicated data types, Shapiro et al. 2011), which build commutativity into the data type itself, the way Coda’s directories commute by semantics, so that replicas converge without resolution.
- Lessons Satyanarayanan draws from Coda’s evolution:
- fear not optimistic replication: it is usable and effective, once controversial and now commonplace;
- real systems need real users: usage experience produced RVM, the dangling-symlink representation of conflicts, rapid cache validation and translucent caching;
- the hardest problems were not the ones the team expected.
10. Design rules
- Choose optimism only with evidence of low write sharing, and keep a pessimistic path for data that is tightly shared.
- Cache whole objects where possible, so a disconnected miss has one clean failure point.
- Hoard with priorities and a profile that fits the cache, protect ancestors, and walk periodically.
- Log updates persistently, optimize the log, and test that the optimizations never change the outcome.
- Detect conflicts syntactically first: store ids against a single first-class copy, version vectors among peers. Resolve semantically only when needed.
- Use the data type’s semantics: directory updates commute unless they collide on a name, a removal or a rename.
- Never lose an update silently: confine a conflict to the object, preserve both versions, and make it visible.
- Let applications resolve their own files, but run resolvers with limited privileges and time, on copies, committed atomically.
- On weak links, age the log before sending it, chunk transfers, and validate caches coarsely first.
- Measure with real users.
Summary
- Optimism vs pessimism:
- pessimistic replication refuses updates outside one partition;
- optimistic replication allows them everywhere and repairs conflicts later. Kistler and Satyanarayanan found over 99% of AFS modifications made by the previous writer; Lab World matches that (99.20%).
- Policy costs:
- for one disconnected day, pessimism refused all 246 of the user’s updates (or 3.2 of the others’);
- optimism produced about one conflict;
- at 30% write sharing, optimism produced 16 conflicts per day.
- Coda: AFS plus server replication plus disconnected operation, with first-class (server) and second-class (cache) replicas, and Venus in hoarding, emulation or reintegration.
- Hoarding: priorities from a hoard profile plus recency; hoard walks; ancestors protected. A focused profile helped most in a small cache (23 failures against LRU’s 49), a broad one that did not fit hurt (79), and only a profile can prevent misses on objects never used before.
- The CML logs every update with the versions it saw. Optimizations shrank a day of work from 250 records to 44 and from 4.5 MB to 528 KB, without ever changing the outcome (3,000 of 3,000 sessions).
- Version vectors were exact in all 597,870 histories. Last writer wins lost updates in 68,736, and with skewed clocks overwrote causally newer versions. Store ids alone raised false conflicts between peers.
- Directory semantics matched commutativity in 94 of 100 operation pairs with no false conflicts, against 30 false conflicts for store ids alone. Failing only conflicting objects kept 369 of 415 records where aborting the volume kept 182.
- Directory resolution from logs finds the latest common entry and replays the rest. More than half of Kumar’s benchmark work cancels as inverse pairs. Finite logs turn long partitions into manual repairs.
- Application-specific resolvers need the application’s knowledge, and sometimes tombstones: keeping deleted records made a calendar merge correct in 625 of 625 cases. They run sandboxed, time-limited and atomic.
- Weak links: an aging window of 600 s halved the data trickled over 9.6 kb/s at the cost of ten minutes of exposure. Volume stamps make reconnection cheap only for private data.
Common pitfalls
- Assuming optimism is safe for any workload: it depends on low write sharing.
- A hoard profile larger than the cache, or a stale one.
- Log optimizations that change the outcome, or that break the version chain.
- Using timestamps (last writer wins) to “resolve” conflicts: concurrent updates are silently lost, and skewed clocks lose causally newer ones.
- Using plain version equality between peers: it cannot tell newer from concurrent.
- Treating any change to a directory as a conflict, or none.
- Aborting all of a client’s work because one file conflicts.
- Identifying objects by path instead of by a permanent id.
- Merging without tombstones, which resurrects deletions.
- Running resolvers with full privileges, unbounded time, or in place.
- Shipping updates over a weak link the moment they happen, or holding them so long that they are at risk.
Exercises
-
Pessimism, priced. A team of 6 shares a project of 200 files, about 33 owned by each member. Each member edits 20 files a day: 90% of the time one of their own (uniformly), 10% of the time one of the 167 others (uniformly). Member D is disconnected for a day. (a) Under a token scheme, D holds exclusive tokens on the 20 files D edited the previous day (about 18 own and 2 foreign). Estimate how many of the others’ 100 edits are refused. (b) Under optimism, estimate the expected number of conflicting files. (c) Redo both if everyone picks uniformly from all 200 files.
Answer
(a) An edit by another member E hits one of D's 18 own tokened files only on a foreign edit: 0.1 × 18/167 ≈ 0.011. It hits one of D's 2 foreign tokens mainly when the token is on E's own file: on average 2/5 = 0.4 of them belong to E, giving 0.9 × 0.4/33 ≈ 0.011 (plus a negligible foreign term). So about 0.022 per edit, and about 2 of the 100 edits are refused. (b) Others make about 10 foreign edits; each lands on one of D's 33 files with probability 33/167 ≈ 0.2, so about 2 per day, and on one D edits today with probability 18/33: about 1.1 conflicts. Each of D's 2 foreign files is edited by its owner that day with probability 1 − (1 − 0.9/33)^20 ≈ 0.42: about 0.8 more. In all, roughly 2 conflicting files. (c) Each of the 100 edits hits one of D's 20 tokened files with probability 0.1, so about 10 are refused. Under optimism each of D's 20 files is also edited by someone else with probability 1 − (1 − 1/200)^100 ≈ 0.39, about 8 conflicting files. Optimism becomes expensive, as in demo 01 Part C. -
Hoarding arithmetic. A laptop has a 50 MB cache. The user’s profile names 30 MB of project files at priority 100 and 40 MB of tools at priority 50. The working set of the last day is 15 MB, mostly tools not named in the profile. (a) What does a hoard walk keep? (b) Why might the user see more misses than with no profile? (c) Suggest a better profile.
Answer
(a) In priority order: the 30 MB of project files (100), then tools named at 50 and recently used objects by their combined priority, until 50 MB is full. Some of the 40 MB of named tools may be cached, and unnamed recently used objects only if their recency score beats 50. (b) If the profile's 70 MB exceeds the cache, named but unused tools can displace recently used unnamed objects. The working set is then evicted in favour of things the user does not need (demo 02, the broad profile at 1 MB). (c) Name only the tools actually used (a recording of a day's references, which Venus can produce), at a lower priority than recent use, and keep the total under the cache size with room for the working set. -
Log optimization by hand. A disconnected session performs: create a.tmp; store a.tmp; store doc; create b; store b; rename a.tmp → a; store doc; unlink b; mkdir d; rmdir d. (a) Write the optimized log. (b) Which optimization is invalid if
aalready existed at the server when the session started, and how must the log handle it?Answer
(a) create a.tmp is folded with the rename into "create a"; store a.tmp becomes store a; the first store doc is superseded by the second; create b, store b and unlink b cancel; mkdir d and rmdir d cancel. Result: create a, store a, store doc. (b) If `a` existed, the rename replaces it, which is an unlink of the old `a` followed by the rename. Folding the rename into the create would make "create a" collide with the existing `a` at replay (name/name), because the binding moves before the old `a`'s removal. The log must keep "unlink a (old)", then "rename a.tmp → a", or fold only when the name was free throughout. This is exactly the bug the course's random test found. -
Vectors by hand. Three servers, initial vector [0, 0, 0] on file F. S1 and S2 are together and apply two updates; then S2 is cut off, and S1 and S3 apply one update; S2 alone applies one. (a) Give each replica’s vector. (b) Which pairs conflict? (c) What would last-writer-wins do, with S2’s clock 5 minutes fast?
Answer
(a) After two updates in {S1, S2}: S1 = S2 = [2, 2, 0], S3 = [0, 0, 0]. Then {S1, S3} update: S1 = [3, 2, 1]; S3 adopts S1's version first (it was behind), so S3 = [3, 2, 1]. S2 alone: S2 = [2, 3, 0]. (b) S1 = S3 = [3, 2, 1] and S2 = [2, 3, 0] are concurrent (3 > 2 in the first entry, 2 < 3 in the second): a conflict. S1 and S3 are equal. (c) It keeps the version with the larger timestamp. If S2's update was the last in real time, or seems so thanks to its fast clock, S2's version wins and the {S1, S3} update is silently lost, or vice versa. Either way one update disappears without anyone being told. -
Directory semantics. For each pair (disconnected client, server-side update), say whether Coda reports a conflict, and of which kind: (a) create /p/x.c / create /p/y.c; (b) unlink /p/old.c / store /p/old.c; (c) store /p/m.c / rename /p/m.c → /p/n.c; (d) mkdir /p/sub / rmdir /p; (e) rename /p/a → /p/b / create /p/b.
Answer
(a) No conflict: different names commute. (b) remove/update: one side removed what the other changed. (c) No conflict: the store reaches the renamed file by fid; the result is n.c with the new content. (d) The server removed /p. If /p had entries, rmdir would have failed, so /p was empty; the client's mkdir into a removed directory is update/remove. (e) name/name: the rename's target name now exists. -
The latest common entry. Three replicas’ logs for a directory, with entries named by store id: S1: [i, a, b, c, x1, x2]; S2: [i, a, b, y1]; S3: [i, a, b, c, y1]. (a) What is the LCE? (b) Which entries does each replica perform? (c) What if S2’s log could hold only 3 entries?
Answer
(a) b: the latest entry in all three logs (c is not in S2's). (b) After b, the partitioned entries are S1 {c, x1, x2}, S2 {y1}, S3 {c, y1}. S1 performs y1. S2 performs c, x1, x2. S3 performs x1, x2. All are subject to the semantic checks; inverse pairs among them are dropped. (c) S2's log would hold only [a, b, y1] or less; if b were overwritten, no common entry would remain, and Coda would declare a conflict for manual repair even if the updates were harmless. -
Tombstones. A shopping-list application stores items as lines; deleting an item removes its line. Two family members edit the list offline: one buys and deletes “milk”, the other adds “eggs”. (a) What does a line-union merge produce, and why is it wrong? (b) Redesign the file format so that an automatic merge is correct. (c) What new problem does the redesign create, and how is it usually handled?
Answer
(a) The union contains milk (the second member's copy still has it) and eggs: the deleted milk is resurrected, because the merge cannot tell "deleted on one side" from "added on the other". (b) Give every item a unique id and keep deleted items as tombstones (id, deleted). Merge by id: an item is live if some side has it and no side has deleted it. (c) Tombstones accumulate forever. They can be removed once every replica is known to have seen the deletion: the same "all replicas have it" condition that lets Coda discard log entries before the latest common entry. -
Aging window. A user on a 9.6 kb/s link saves a 40 KB file every 2 minutes for an hour, then stops. (a) With no aging window, how many bytes travel, and does the link keep up? (b) With A = 10 minutes? (c) What is the largest amount of work at risk in each case if the laptop is stolen at minute 59?
Answer
(a) 30 stores of 40 KB = 1.2 MB. Each takes 40,000 × 8 / 9,600 ≈ 33 s plus the record, under the 2 minutes between saves, so the link keeps up: every version is sent, and the link is busy about 28% of the hour. (b) A store waits 10 minutes; any later store of the same file within that time cancels it. With saves every 2 minutes, every store except the last is superseded before it ages, so during the hour almost nothing is sent, and the final version goes 10 minutes after the last save: about 40 KB. (c) With no window, at most the save in flight plus the one not yet sent, about the last 2 minutes of work. With A = 10 minutes, the server has only the version from before the window, so up to 10 minutes of work is lost: the exposure that buys the bandwidth saving.
Related project and problem set (concepts only)
- Project 2 builds a whole-file caching proxy with open-close session semantics and an LRU cache. §2.1’s points about whole-file caching (a miss only at open) and §2.3’s about priorities and eviction apply to it. The proxy is connected, so nothing here about logs or reintegration is part of it, and nothing here is project code.
- Problem Set 2 covers caching and consistency strategies; §1 and §4 give the vocabulary of optimistic and pessimistic choices. No problem-set answers are given.
Further reading
- J. J. Kistler and M. Satyanarayanan, “Disconnected Operation in the Coda File System”, ACM TOCS 10(1), 1992 — the reading.
- M. Satyanarayanan, “The Evolution of Coda”, ACM TOCS 20(2), 2002 — the reading.
- P. Kumar and M. Satyanarayanan, “Log-Based Directory Resolution in the Coda File System”, PDIS 1993 — the reading.
- P. Kumar and M. Satyanarayanan, “Flexible and Safe Resolution of File Conflicts”, USENIX Winter 1995 — the reading.
- D. S. Parker et al., “Detection of Mutual Inconsistency in Distributed Systems”, IEEE TSE SE-9(3), 1983.
- S. B. Davidson, H. Garcia-Molina and D. Skeen, “Consistency in Partitioned Networks”, ACM Computing Surveys 17(3), 1985.
- L. Mummert, M. Ebling and M. Satyanarayanan, “Exploiting Weak Connectivity for Mobile File Access”, SOSP 1995.
- D. Terry et al., “Managing Update Conflicts in Bayou, a Weakly Connected Replicated Storage System”, SOSP 1995.
- Y. Saito and M. Shapiro, “Optimistic Replication”, ACM Computing Surveys 37(1), 2005.
- M. Shapiro, N. Preguiça, C. Baquero and M. Zawirski, “Conflict-Free Replicated Data Types”, SSS 2011.
Preview of Lecture 23 — Distributed lotteries: blockchains
Paxos (Lectures 20–21) needs to know who the participants are, so that it can count a majority. What if anyone may join, under as many identities as they like? Voting by identity then fails: one attacker can be a majority (a Sybil attack). Lecture 23 covers:
- proof of work, which turns agreement into a lottery whose tickets cost computation;
- the longest-chain rule, forks, and the probability that a payment is reversed after k confirmations;
- proof of stake;
- how these trade finality, energy and throughput against the guarantees of Lectures 18–21, and when a blockchain is the wrong tool.
术语表 (Glossary, English → 中文)
| English | 中文 |
|---|---|
| optimistic / pessimistic replica control | 乐观 / 悲观副本控制 |
| disconnected operation | 断连操作 |
| weakly connected operation | 弱连接操作 |
| first-class / second-class replica | 一等 / 二等副本 |
| volume storage group (VSG) / accessible VSG (AVSG) | 卷存储组 / 可达卷存储组 |
| hoarding / hoard database / hoard profile | 囤积 / 囤积数据库 / 囤积配置文件 |
| hoard walk / cache equilibrium | 囤积巡检 / 缓存平衡 |
| hierarchical cache management | 层次化缓存管理 |
| emulation / reintegration | 仿真(模拟服务器) / 重新整合 |
| write-disconnected state | 写断连状态 |
| client modification log (CML) / replay log | 客户端修改日志 / 重放日志 |
| log optimization / cancellation | 日志优化 / 抵消 |
| store id | 存储标识(存储号) |
| version vector | 版本向量 |
| happened-before | 先行发生关系 |
| last writer wins | 最后写入者胜 |
| write/write conflict / read/write conflict | 写写冲突 / 读写冲突 |
| name/name, remove/update, update/update, rename/rename conflict | 名字冲突、删除/更新冲突、更新/更新冲突、重命名冲突 |
| commute | 可交换 |
| local–global conflict / server–server conflict | 本地-全局冲突 / 服务器-服务器冲突 |
| back-fetching | 回取 |
| replay file / manual repair | 重放文件 / 人工修复 |
| directory resolution / file resolution | 目录解析(合并) / 文件解析 |
| resolution log / latest common entry (LCE) | 解析日志 / 最近公共条目 |
| compensation / inverse operations | 补偿 / 互逆操作 |
| lazy resolution | 惰性解析 |
| application-specific resolver (ASR) | 应用特定解析器 |
| tombstone | 墓碑(删除标记) |
| trickle reintegration / aging window | 涓流式重新整合 / 老化窗口 |
| chunk size | 分块大小 |
| rapid cache validation / volume version stamp | 快速缓存验证 / 卷版本戳 |
| translucent caching / user patience model | 半透明缓存 / 用户耐心模型 |
| isolation-only transaction (IOT) | 仅隔离事务 |
| conflict-free replicated data type (CRDT) | 无冲突复制数据类型 |
| exposure (data at risk) | 暴露时间(数据风险窗口) |