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

False positive on lost update #28

Closed
bsbds opened this issue Jul 22, 2024 · 2 comments
Closed

False positive on lost update #28

bsbds opened this issue Jul 22, 2024 · 2 comments

Comments

@bsbds
Copy link

bsbds commented Jul 22, 2024

Hi, I recently use jepsen to test our database, and I suspect that elle sometimes generates false-positive lost update anomalies during history analyses.

To reproduce, consider the following jepsen history:

(def h (h/history
        [{:index 0 :time 0 :type :invoke :process 0 :f :txn :value [[:r 1 nil] [:w 1 2]]}
         {:index 1 :time 1 :type :invoke :process 1 :f :txn :value [[:r 1 nil] [:w 1 3]]}
         {:index 2 :time 2 :type :ok :process 0 :f :txn :value [[:r 1 2] [:w 1 2]]}
         {:index 3 :time 3 :type :ok :process 1 :f :txn :value [[:r 1 2] [:w 1 3]]}]))
  1. The first txn writes the exact same value as the initial value.
  2. The second txn writes a different value to the key.

It appears that elle would interpret the second txn as having read the initial value and thereby generating a false-positive lost update anomaly.

@aphyr
Copy link
Contributor

aphyr commented Jul 23, 2024

Can I ask how you got this history? Elle initial values are always supposed to be nil, not 2. If you're getting a 2 out of thin air, something is seriously wrong with this database and Elle should be complaining about it.

@bsbds
Copy link
Author

bsbds commented Jul 24, 2024

Can I ask how you got this history? Elle initial values are always supposed to be nil, not 2. If you're getting a 2 out of thin air, something is seriously wrong with this database and Elle should be complaining about it.

Sorry, I realize I made a mistake. I assumed the key had an initial value, but the same value shouldn't be written by more than one operation. Thanks for the clarification!

@bsbds bsbds closed this as completed Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants