Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Add check for mismatch of operations in history" #11

Merged
merged 1 commit into from
Jun 28, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions src/elle/list_append.clj
Original file line number Diff line number Diff line change
Expand Up @@ -298,27 +298,6 @@
:duplicates dups})))))
seq))

(defn op-mismatch
"Given a history, find mismatches of mop invocations to its completion.
They should match exactly except for [:r k nil], which can match any
[:r k v]."
[history]
(->> history
pair-index
; Only take invoke/complete pairs
(filter (fn [[invoke complete]] (= (:type invoke) :invoke)))
; map to vector of mops pairs: (([pair pair]), (pairs), ...)
(map (fn [[invoke complete]] (map vector (:value invoke) (:value complete))))
; -> [([pair pair]), (pairs), ...]
(into [])
(map (partial filter (fn [[invoke complete]]
(not
(if (and (= (first invoke) :r) (= (last invoke) nil))
(and (= (first complete) :r) (= (second invoke) (second complete)))
(= invoke complete))))))
(keep seq)
seq))

(defn merge-orders
"Takes two potentially incompatible read orders (sequences of elements), and
computes a total order which is consistent with both of them: where there are
Expand Down Expand Up @@ -779,7 +758,6 @@
(check {} history))
([opts history]
(let [history (remove (comp #{:nemesis} :process) history)
op-mismatch (op-mismatch history)
g1a (g1a-cases history)
g1b (g1b-cases history)
internal (internal-cases history)
Expand All @@ -800,7 +778,6 @@

; And merge in our own anomalies
anomalies (cond-> cycles
op-mismatch (assoc :op-mismatch op-mismatch)
dups (assoc :duplicate-elements dups)
incmp-order (assoc :incompatible-order incmp-order)
internal (assoc :internal internal)
Expand Down