Git Product home page Git Product logo

Comments (4)

valchkou avatar valchkou commented on June 1, 2024

Sorry, I am not clear of your question.
There is no race condition or blocking for version column on read.
Version column is read the same way as any other columns.
The only difference is on write:
if what you write has ver different from what is in DB the write will not succeed.
I hope this helps

from cassandra-driver-mapping.

nitinpadalia avatar nitinpadalia commented on June 1, 2024

I mean during write operation does't driver first need to read what's the
current version in db to compare it with the version being written so that
err could be thrown if the version being written is old?
If we're reading for comparison before finally writing then how that read is concurrency issue free?
On Mar 28, 2015 4:26 AM, "Eugene" [email protected] wrote:

Sorry, I am not clear of your question.
There is no race condition or blocking on version column on read.
Version column is read the same way as any other columns.
The only difference is on write:
if what you write has ver different from what is in DB the write will not
succeed.
I hope this helps


Reply to this email directly or view it on GitHub
#53 (comment)
.

from cassandra-driver-mapping.

valchkou avatar valchkou commented on June 1, 2024

There is no read operation before write.
please read this link to understand the concept
http://www.datastax.com/documentation/cassandra/2.0/cassandra/dml/dml_ltwt_transaction_c.html

Mapper uses Lightweight transactions feature provided by Cassandra.
Update statement contains IF condition to compare version (IF version=object.version)
Cassandra guaranties that update happens only when condition is met.

Lightweight transactions comes with performance cost.
This is Cassandra limitation but not my mapper or datastax driver.

from cassandra-driver-mapping.

nitinpadalia avatar nitinpadalia commented on June 1, 2024

Ok so it being ensured by LWT, got it thanks!

from cassandra-driver-mapping.

Related Issues (20)

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.