@@ -26,8 +26,6 @@ Symmetry == Permutations(Stores) \cup Permutations(Connections) \cup Permutation
2626
2727ConnOpen ( c ) == connections [ c ] . open
2828
29- ConnPendingUpgrade ( c ) == connections [ c ] . pendingUpgrade
30-
3129TxForConn ( c ) == { tx \in Transactions : Live ( tx ) /\ transactions [ tx ] . conn = c }
3230
3331AllTxFinishedForConn ( c ) ==
@@ -67,7 +65,6 @@ TypeOK ==
6765 /\ oldDbVersion \in Versions
6866 /\ connections \in [ Connections ->
6967 [ open : BOOLEAN ,
70- pendingUpgrade : BOOLEAN ,
7168 requestedVersion : Versions ,
7269 closed : BOOLEAN ,
7370 close_pending : BOOLEAN ] ]
@@ -137,7 +134,6 @@ DefaultTx ==
137134
138135DefaultConn ==
139136 [ open |-> FALSE ,
140- pendingUpgrade |-> FALSE ,
141137 requestedVersion |-> 0 ,
142138 closed |-> FALSE ,
143139 close_pending |-> FALSE ]
@@ -160,7 +156,6 @@ StartOpenConnection(c, requestedVersion) ==
160156 /\ Len ( connection_queue ) < Cardinality ( Connections )
161157 /\ connections ' = [ connections EXCEPT
162158 ! [ c ] = [ open |-> FALSE ,
163- pendingUpgrade |-> ( requestedVersion > dbVersion ) ,
164159 requestedVersion |-> requestedVersion ,
165160 closed |-> FALSE ,
166161 close_pending |-> FALSE ]
@@ -179,8 +174,8 @@ FinishOpenConnection(c) ==
179174 /\ IF connections [ c ] . closed
180175 \* If connection was closed,
181176 \* return a newly created "AbortError" DOMException and abort these steps.
182- THEN connections ' = [ connections EXCEPT ! [ c ] . pendingUpgrade = FALSE ]
183- ELSE connections ' = [ connections EXCEPT ! [ c ] . open = TRUE , ! [ c ] . pendingUpgrade = FALSE ]
177+ THEN connections ' = connections
178+ ELSE connections ' = [ connections EXCEPT ! [ c ] . open = TRUE ]
184179 /\ connection_queue ' = Tail ( connection_queue )
185180 /\ UNCHANGED << transactions , stores , pending_stores , dbVersion , oldDbVersion , next_tx_order >>
186181
@@ -190,7 +185,6 @@ FinishOpenConnection(c) ==
190185RejectOpenConnection ( c ) ==
191186 /\ Len ( connection_queue ) > 0
192187 /\ c = Head ( connection_queue )
193- /\ ~ connections [ c ] . pendingUpgrade
194188 /\ connections [ c ] . requestedVersion < dbVersion
195189 /\ connections ' = [ connections EXCEPT ! [ c ] = DefaultConn ]
196190 /\ connection_queue ' = Tail ( connection_queue )
@@ -207,7 +201,7 @@ CreateUpgradeTransaction(c) ==
207201 /\ Len ( connection_queue ) > 0
208202 /\ ~ ConnOpen ( c )
209203 /\ c = Head ( connection_queue )
210- /\ ConnPendingUpgrade ( c )
204+ /\ connections [ c ] . requestedVersion > dbVersion
211205 /\ \A other \in ( Connections \ { c } ) : ~ ConnOpen ( other )
212206 /\ freeTxs # { }
213207 /\ transactions ' = [ transactions EXCEPT
0 commit comments