From: rtrimana Date: Mon, 22 Aug 2016 23:12:14 +0000 (-0700) Subject: Adding rollback/mismatch detection when updating last sequence number X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4d54501b1d2a031fe85913181300b41181be047c;p=iotcloud.git Adding rollback/mismatch detection when updating last sequence number --- diff --git a/doc/iotcloud.tex b/doc/iotcloud.tex index 1016f55..9d10557 100644 --- a/doc/iotcloud.tex +++ b/doc/iotcloud.tex @@ -310,6 +310,15 @@ $MaxSMSeqN(SM_s)= s$ \textit{such that} $\tuple{s, id} \in SM_s \If{$s_t = \emptyset$} \State $MS_s[id_s] = s_s$ \Comment{First occurrence} \Else + \If{$id_s = id_{self}$} + \If{$s_t \neq s_s$}\Comment{Check for mismatch on $s$} + \State \Call{Error}{'Mismatch on $s$ for $id_{self}$'} + \EndIf + \Else + \If{$s_t > s_s$}\Comment{Check for rollback on $s$} + \State \Call{Error}{'Rollback on $s$ for $id_s$'} + \EndIf + \EndIf \State $MS_S[id_s] \gets max(s_t, s_s)$ \EndIf \State \Return{$MS_s$}