start of new file
[IRC.git] / Robust / src / Runtime / DSTM / docs / commitnotes
1 Per object possibilities:
2
3 1) Lock acquired, version id matches
4
5 2) No lock, but version id matches
6
7 3) Version id doesn't match
8
9 4) Not here
10
11 Participant responses to coordinator
12
13 A) DISAGREE (if we ever see at least 1 #3)
14
15 B) AGREE (all #1)
16
17 C) AGREE BUT MISSING OBJECTS (mixture of #1 and #4 - no #2 or #3) -
18 return list of oid's for missing objects (need to build list)
19
20 D) SOFT ABORT (need #2, could have #1, #4, can't have #3) - make sure
21 there are no #3's
22
23 Coordinator:
24
25 I) ABORT (Any A's) (rerun computation, clear out transaction records, etc...)
26
27 II) COMMIT (All B's) - do local commit, free storage
28
29 III) ABORT BUT RETRY COMMIT (don't rerun computation) (Need D, can
30 have B's, can have C', no A's)
31
32 IV) ABORT BUT RETRY COMMIT WITH RELOCATING (don't rerun computation,
33 but relookup all missing objects) (Need C, can have B's, no A's, no
34 D's)
35
36 Other machine involved in transaction:
37
38 I) COMMIT - commit object into store, send ACK to coordinator
39
40 II) ABORT - unlock objects, free transaction resources, send ACK to coordinator
41
42 III) Coordinator unreachable:
43
44         1) Elect leader out of reachable nodes (choose smallest reachable mid)
45
46         2) leader queries everyone for what they've heard
47 (ABORT/COMMIT/nothing)
48
49         3) If anyone has heard commit from original leader, all commit
50
51         4) If anyone has heard abort from original leader, all abort
52
53         5) Otherwise leader does following:
54
55         for each mid in group send SUSPICIOUS_ABORT()
56
57         receive acknowledgements from mid's
58
59         for each mid in group send TRUST_ONLY(nodes that send
60 acknowledgements)
61
62         In case 5, machines become suspicious of all current machines
63 not on the list.  When first contacting (or being contacted by a
64 machine isn't in the list, it is suspicious of all current machines
65 except the leader).  The machine won't talk to a machine it is
66 suspicious of until it can verify that the other machines made the
67 same decision on all "suspicious" transactions.
68
69 COORDINATOR:
70
71 Once it has received ACK's from all other machines in transaction:
72
73 1) It sends a recycle transaction id message (they don't need to
74 remember the ABORT/COMMIT result of that id anymore)
75
76 2) After sending all these messages and receiving ack's, it marks it
77 local copy of transaction id recyclable