File tree Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -198,8 +198,30 @@ begin
198198 ConsumerLoop:
199199 while replication_requests /= { } do
200200 with replication_request \in replication_requests do
201- req := replication_request ;
202- replication_requests := replication_requests \ { replication_request} ;
201+ if replication_request. type = ADD
202+ then
203+ (* Never see two ADDs - if duplicated, one of them is a RETRY_ADD *)
204+ either
205+ (* Process ADD without duplication *)
206+ replication_requests := replication_requests \ { replication_request } ;
207+ req := replication_request ;
208+ or
209+ (* Process ADD and leave a duplicate RETRY_ADD for later *)
210+ replication_requests := ( replication_requests \ { replication_request } )
211+ \cup { [ replication_request EXCEPT ! . type = RETRY_ADD ] } ;
212+ req := replication_request ;
213+ or
214+ (* Process duplicate RETRY_ADD and leave the original ADD *)
215+ req := [ replication_request EXCEPT ! . type = RETRY_ADD ] ;
216+ end either ;
217+ else
218+ req := replication_request ;
219+ either
220+ skip;
221+ or
222+ replication_requests := replication_requests \ { replication_request } ;
223+ end either ;
224+ end if;
203225 end with ;
204226
205227 if req . type = DELETE
You can’t perform that action at this time.
0 commit comments