diff --git a/tools/ocaml/xenstored/history.ml b/tools/ocaml/xenstored/history.ml index e941e2bfb5..4079588896 100644 --- a/tools/ocaml/xenstored/history.ml +++ b/tools/ocaml/xenstored/history.ml @@ -60,11 +60,12 @@ let push (x: history_record) = | Some d -> if not (Domain.is_free_to_conflict d) then history := x :: !history (* Find the connections from records since commit-count [since] for which [f record] returns [true] *) -let filter_connections ~since ~f = +let filter_connections ~ignore ~since ~f = (* The "mem" call is an optimisation, to avoid calling f if we have picked con already. *) (* Using a hash table rather than a list is to optimise the "mem" call. *) List.fold_left (fun acc hist_rec -> if hist_rec.finish_count > since + && not (hist_rec.con == ignore) && not (Hashtbl.mem acc hist_rec.con) && f hist_rec then Hashtbl.replace acc hist_rec.con (); diff --git a/tools/ocaml/xenstored/process.ml b/tools/ocaml/xenstored/process.ml index aaeb18b164..4d164349f9 100644 --- a/tools/ocaml/xenstored/process.ml +++ b/tools/ocaml/xenstored/process.ml @@ -344,7 +344,7 @@ let transaction_replay c t doms cons = then (punish hist_rec.History.con; true) else false ) in - let guilty_cons = History.filter_connections ~since:t.Transaction.start_count ~f:judge_and_sentence in + let guilty_cons = History.filter_connections ~ignore:c ~since:t.Transaction.start_count ~f:judge_and_sentence in if Hashtbl.length guilty_cons = 0 then debug "Found no culprit for conflict in %s: must be self or not in history." con; false )