Scylla: Support Cassandra lightweight transactions (LWT)

Created on 16 Jun 2016  ·  37Comments  ·  Source: scylladb/scylla

Lightweight transactions (LWT), aka compare and set transactions, ensure transaction isolation beyond eventual consistency. LWT are useful in cases where two or more clients needs to create the same entity, resulting in one, and only one, entity.

https://docs.datastax.com/en/cassandra/2.1/cassandra/dml/dml_ltwt_transaction_c.html

User Request cassandra 2.2 compatibility consensus enhancement lwt

Most helpful comment

Merged to master. The follow up master ticket to track performance optimizations, enhancements, and testing is #5202 . The feature is still experimental and will be available under --experimental switch.

All 37 comments

Hi @tzach , Do you think there are any chances this is coming before 2.0 ?

+1

https://issues.apache.org/jira/browse/CASSANDRA-6246 . I hope ScyllaDB implements this or better!

C* 3.6 added CAS info to Nodetool proxyhistograms
https://issues.apache.org/jira/browse/CASSANDRA-11507

I'd literally do anything to get this one working. If you could tell me how to start and in which direction you'd like this to go, I'd give my programming skills a try. It might take me weeks or months, but I want this so much I don't care ❤️

Any update on the progress on this issue? I just saw your progress on materialized views preview in 2.0, are we lucky enough to be getting LWT too? 😏

@ssboisen not in 2.0, we plan to have experimental LWT at 2.3

@tzach alright, thank you for replying :-) I'm very much looking forward to that, at Lix our datamodel rely heavily on LWTs as we use an event based architecture were we use cassandra to guarantee consistency of total order of the events inside a partition so we can't move to scylla before LWTs :)

+1

Is this available in 2.3-rc1 as an experimental feature? Apparently @kong relies on this feature for a couple of things and does not work without it.

It is not, the feature is still in the design stage.

Looking forward to this feature

I ran into this overnight, was a bit surprised to find that an IF NOT EXISTS triggered the Not implemented: LWT error. In hindsight I think I understand how complex it is to resolve this without incurring large performance penalties. Still, penalty or not, this is a fairly significant Cassandra incompatibility that should be resolved as soon as possible, perhaps just with a large performance impact warning, or with significant restrictions (e.g. verified only on the node with the matching partition key).

I believe I can work around this limitation (drop all my IF NOT EXISTS) but in cases where I need to know to continue, it will be much less efficient to pre-query the current status at my end than at the Scylla server end. Please implement at least IF NOT EXISTS on INSERT as soon as possible.

It would be great to have this in ScyllaDb

That's the plan, we can't wait to have LWT too in order to use it for db
management tasks.
We had to pull too many resources over too much time for materialized views
but as we ship
3.0 we'll be able to focus on LWT

On Tue, Oct 2, 2018 at 2:36 PM ayZagen notifications@github.com wrote:

It would be great to have this in ScyllaDb


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/scylladb/scylla/issues/1359#issuecomment-426439018,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABp6Rfk4RtPPqdrs7kwjFrtgMpVZZVr1ks5ug9xggaJpZM4I3nld
.

That's the plan, we can't wait to have LWT too in order to use it for db management tasks. We had to pull too many resources over too much time for materialized views but as we ship 3.0 we'll be able to focus on LWT

On Tue, Oct 2, 2018 at 2:36 PM ayZagen @.*> wrote: It would be great to have this in ScyllaDb — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#1359 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/ABp6Rfk4RtPPqdrs7kwjFrtgMpVZZVr1ks5ug9xggaJpZM4I3nld .

so 3.0 will support LWT ? seems RC was released ,waiting for this feature for a long time .

The prior msg said that once 3.0 ships we can focus on LWT and that's what
we do.
3.0 is complete and just in the last cycles of QA and we'll double down on
LWT asap

On Mon, Dec 3, 2018 at 6:22 PM thomasdba notifications@github.com wrote:

That's the plan, we can't wait to have LWT too in order to use it for db
management tasks. We had to pull too many resources over too much time for
materialized views but as we ship 3.0 we'll be able to focus on LWT
… <#m_-4223993998330359563_>
On Tue, Oct 2, 2018 at 2:36 PM ayZagen @.*> wrote: It would be
great to have this in ScyllaDb — You are receiving this because you are
subscribed to this thread. Reply to this email directly, view it on GitHub <#1359
(comment)
https://github.com/scylladb/scylla/issues/1359#issuecomment-426439018>,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABp6Rfk4RtPPqdrs7kwjFrtgMpVZZVr1ks5ug9xggaJpZM4I3nld
.

so 3.0 will support LWT ? seems RC was released ,waiting for this feature
for a long time .


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/scylladb/scylla/issues/1359#issuecomment-443945664,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABp6RS64zvbB_jurosdX4RIcN-Fzg5m_ks5u1dx9gaJpZM4I3nld
.

I'm using Lagom in my application. I thought I can change my backend to Syclla which may improve application's performance. However I get across this problem. It says:

Caused by: com.datastax.driver.core.exceptions.ServerError: An unexpected error occurred server side on /127.0.0.1: Not implemented: LWT

Looking forward this feature.

We finally started coding it, after finalizing the design. Estimations
(positive) are around 3-4 months

On Mon, Mar 4, 2019 at 7:59 PM Wayne Wang notifications@github.com wrote:

I'm using Lagom in my application. I thought I can change my backend to
Syclla which may improve application's performance. However I get across
this problem. It says:

Caused by: com.datastax.driver.core.exceptions.ServerError: An unexpected error occurred server side on /127.0.0.1: Not implemented: LWT

Looking forward this feature.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/scylladb/scylla/issues/1359#issuecomment-469527998,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABp6RYOih-wyPyRJUkFlKnpsqv9sQtYJks5vTeu-gaJpZM4I3nld
.

Is LWT available in latest Scylla version -3.0.3? Or is it still in the implementation phase?

Is LWT available in latest Scylla version -3.0.3? Or is it still in the implementation phase?

LWT still in an implementation phase, and patch release does not include new features.
You can follow this issue to see when commits are merged to master branch, a prerequisite for a release.

Hope LWT feature will be implemented soon !

Like @WayneWang12 I ran into the same Not Implemented: LWT error with my Lagom application.
I am particularly interested in Scyllab because it could be more cost-effective to deploy in the cloud as an event persistence database than Cassandra.

The first patches were sent in the last week, but it will take time to
complete the feature and get to GA level.
Thanks for your interest, it's top priority!

On Fri, Apr 5, 2019 at 1:20 PM Nicolas Rouquette notifications@github.com
wrote:

Like @WayneWang12 https://github.com/WayneWang12 I ran into the same Not
Implemented: LWT error with my Lagom application.
I am particularly interested in Scyllab because it could be more
cost-effective to deploy in the cloud as an event persistence database than
Cassandra.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/scylladb/scylla/issues/1359#issuecomment-480409640,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABp6RXOGpKZmZcnJfN0swG58XaZNBluBks5vd7AUgaJpZM4I3nld
.

Hi @dorlaor thank you for making this a top priority, could you please share the branch with me for the current status?

Development is slow but progressing, 4 days ago a major patch was send to
scylladb-dev mailing list (it's public) about the raft interfaces and
we just hired a very experienced additional programmer to help out

On Mon, Apr 29, 2019 at 1:17 AM RobNL notifications@github.com wrote:

Hi @dorlaor https://github.com/dorlaor thank you for making this a top
priority, could you please share the repo with me for the current status?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/scylladb/scylla/issues/1359#issuecomment-487488066,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AANHURKD7H2BFDTRUTTD6PDPS2VINANCNFSM4CG6PFOQ
.

Howdy! :) Since we discovered Scylla, we'd love to move on, but LWT is I believe the most basic module. My question is, are there any news when we can expect CAS implemented (approximately)? I.e. in a month, in 6 months, a year etc.? :)

We've done progress and also have another key person on the job, I think that by the Scylla summit (November) we'll have a beta+ release (without over promising)

@dorlaor , thank You for quick reply. Can't wait for it! :heart: You're doing GREAT JOB! :wink:

@tzach @dorlaor or anyone, what's the status of LWT development? Any release date?

@tzach @dorlaor or anyone, what's the status of LWT development? Any release date?

Its under active development by @kostja team
The plan is to share early access in the new 2 months or so, and have it as a part of a later offical release.

Thanks @tzach. Any timeline to get LWT in Alternator too?

To be more accurate, some of the patches got committed yesterday, some on our way in.
https://github.com/scylladb/scylla/commit/c6b66d197bfb1114542749d7a1062eea756d44e7

@hdzh once LWT is merged, we can better evlaute the work for Alternator.
Follow #5054 for updates.

Merged to master. The follow up master ticket to track performance optimizations, enhancements, and testing is #5202 . The feature is still experimental and will be available under --experimental switch.

Once it moves out of experimental we can close the issue - till then it needs to remain openned

Was this page helpful?
0 / 5 - 0 ratings