Giter Club home page Giter Club logo

Comments (7)

aphyr avatar aphyr commented on August 28, 2024

from elle.

Tsunaou avatar Tsunaou commented on August 28, 2024

Sorry, maybe I didn't describe it clearly. What I want to construct is a lost-update anomaly.
Suppose the 3 transactions as t1, t2 t3. I set t3 start only after t1 and t2 commit., soe have the execution satisfies

commitTs(t1) < startTs(t3)
commitTs(t2) < startTs(t3)

The full history is here

{:process 0, :f :txn, :part true, :value [[:start-txn nil true] [:r 0 0]], :time 216149557, :type :ok, :index 15}
{:process 1, :f :txn, :part true, :value [[:start-txn nil true] [:w 0 2]], :time 241574330, :type :ok, :index 24}
{:process 1, :f :txn, :part true, :value [[:commit-txn nil true]], :time 1255571934, :type :ok, :index 46}
{:process 0, :f :txn, :part true, :value [[:w 0 1] [:commit-txn nil true]], :time 1273574209, :type :ok, :index 60}
{:process 3, :f :txn, :part false, :value [[:r 0 1]], :time 1283358766, :type :ok, :index 68}

It is right that one valid serializable schedule is <t1, t3, t2>, but t3 happens last actually.
It's like both t1 and t2 execute in the morning and t3 execute in the evening.

We only consider t1 and t2.

  • If t1 happens before t2, we should read 2 in t3.
  • if t2 happens before t1, we should read 2 in t1.

So the execution is neither <t1, t2, t3> nor <t2, t1, t3>.

It is an anomaly, but it is really hard to describe.

from elle.

aphyr avatar aphyr commented on August 28, 2024

This history is still serializable though. That's what serializability means--equivalence to some ordering of transactions.

from elle.

Tsunaou avatar Tsunaou commented on August 28, 2024

Thanks, I will close this issue.

from elle.

aphyr avatar aphyr commented on August 28, 2024

If you're asking if it's strict serializable... the answer is no, and Elle should, I think be able to detect this. Did you try it?

from elle.

Tsunaou avatar Tsunaou commented on August 28, 2024

I will take a try, thank you very much.

from elle.

aphyr avatar aphyr commented on August 28, 2024

(Whether it can detect a realtime violation with a read-write register might depend on the strength of the per-key version order inference; I'm not sure off the top of my head whether a linearizable-key or WFR assumption is sufficient here. Should definitely work with a list-append workload though!)

from elle.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.