Details
-
Bug
-
Resolution: Fixed
-
Major
-
Cheshire-Cat
-
None
-
Untriaged
-
1
-
Unknown
Description
The couchbase.checker/set-upsert-checker currently returns both false-positive and false-negative results in some scenarios.
The checker incorrectly accepts a history in which a read returns an incorrect value that was never written:
couchbase.core=> (jepsen.checker/check (couchbase.checker/set-upsert-checker) nil
|
#_=> [{:value 1 :process 1 :type :invoke :f :add :insert-value 1}
|
#_=> {:value 1 :process 1 :type :ok :f :add :insert-value 1}
|
#_=> {:value nil :process 2 :type :invoke :f :read}
|
#_=> {:value [[1 2]] :process 2 :type :ok :f :read}]
|
#_=> {})
|
{:upsert-acknowledged-count 0, :ok-count 1, :add-rolled-back "#{}", :valid? true, :lost-count 0, :upsert-attempt-count 0, :add-acknowledged-count 1, :lost "#{}", :add-not-rolled-back "#{}", :upsert-rolled-back "#{}", :add-not-rolled-back-count 0, :recovered "#{}", :upsert-not-rolled-back-count 0, :ok "#{1}", :unexpected "#{}", :unexpected-count 0, :upsert-not-rolled-back "#{}", :add-attempt-count 1, :recovered-count 0}
|
The checker incorrectly accepts a history in which a read does not observe a prior write by the same process:
couchbase.core=> (jepsen.checker/check (couchbase.checker/set-upsert-checker) nil
|
#_=> [{:value 1 :process 1 :type :invoke :f :add :insert-value 1}
|
#_=> {:value 1 :process 1 :type :ok :f :add :insert-value 1}
|
#_=> {:value 1 :process 1 :type :invoke :f :upsert :insert-value 2}
|
#_=> {:value 1 :process 1 :type :ok :f :upsert :insert-value 2}
|
#_=> {:value nil :process 1 :type :invoke :f :read}
|
#_=> {:value [[1 1]] :process 1 :type :ok :f :read}]
|
#_=> {})
|
{:upsert-acknowledged-count 1, :ok-count 1, :add-rolled-back "#{}", :valid? true, :lost-count 0, :upsert-attempt-count 1, :add-acknowledged-count 1, :lost "#{}", :add-not-rolled-back "#{}", :upsert-rolled-back "#{}", :add-not-rolled-back-count 0, :recovered "#{}", :upsert-not-rolled-back-count 0, :ok "#{1}", :unexpected "#{}", :unexpected-count 0, :upsert-not-rolled-back "#{}", :add-attempt-count 1, :recovered-count 0}
|
The checker incorrectly rejects a history following a failed :add and failed :upsert operation:
couchbase.core=> (jepsen.checker/check (couchbase.checker/set-upsert-checker) nil
|
#_=> [{:value 1 :process 1 :type :invoke :f :add :insert-value 1}
|
#_=> {:value 1 :process 1 :type :fail :f :add :insert-value 1}
|
#_=> {:value 1 :process 2 :type :invoke :f :upsert :insert-value 2}
|
#_=> {:value 1 :process 2 :type :fail :f :upsert :insert-value 2}
|
#_=> {:value nil :process 3 :type :invoke :f :read}
|
#_=> {:value [] :process 3 :type :ok :f :read}]
|
#_=> {})
|
{:upsert-acknowledged-count 0, :ok-count 0, :add-rolled-back "#{}", :valid? false, :lost-count 0, :upsert-attempt-count 1, :add-acknowledged-count 0, :lost "#{}", :add-not-rolled-back "#{}", :upsert-rolled-back "#{}", :add-not-rolled-back-count 0, :recovered "#{}", :upsert-not-rolled-back-count 0, :ok "#{}", :unexpected "#{1}", :unexpected-count 1, :upsert-not-rolled-back "#{}", :add-attempt-count 1, :recovered-count 0}
|