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

Support Cassandra lightweight transactions (LWT) #1359

Closed
tzach opened this issue Jun 16, 2016 · 37 comments
Closed

Support Cassandra lightweight transactions (LWT) #1359

tzach opened this issue Jun 16, 2016 · 37 comments

Comments

@tzach
Copy link
Contributor

tzach commented Jun 16, 2016

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

@tzach tzach added this to the 1.4 milestone Jul 21, 2016
@tzach tzach modified the milestones: 2.0, 1.4 Aug 31, 2016
@bobymicroby
Copy link

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

@npenkov
Copy link

npenkov commented Nov 10, 2016

+1

@kant111
Copy link

kant111 commented Mar 2, 2017

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

@tzach
Copy link
Contributor Author

tzach commented Mar 23, 2017

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

@p2k
Copy link

p2k commented May 16, 2017

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 ❤️

@ssboisen
Copy link

ssboisen commented Aug 2, 2017

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? 😏

@tzach
Copy link
Contributor Author

tzach commented Aug 2, 2017

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

@ssboisen
Copy link

ssboisen commented Aug 3, 2017

@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 :)

@dnrusakov
Copy link

dnrusakov commented Jan 21, 2018

+1

@duarten duarten self-assigned this Mar 24, 2018
brawnski pushed a commit to brawnski/xandra that referenced this issue Jun 12, 2018
* Taken from https://github.com/zmagajna/xandra/tree/scylladb
  What were once custom types are in CQL v4
* LWT are unsupported in ScyllaDB versions prior to 2.3 (at least)
  scylladb/scylladb#1359
@mrusme
Copy link

mrusme commented Aug 13, 2018

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.

@duarten
Copy link
Contributor

duarten commented Aug 13, 2018

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

@guodaxia103
Copy link

Looking forward to this feature

@appurist
Copy link

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.

@ayZagen
Copy link

ayZagen commented Oct 2, 2018

It would be great to have this in ScyllaDb

@dorlaor
Copy link
Contributor

dorlaor commented Oct 2, 2018 via email

@thomasdba
Copy link

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 .

@dorlaor
Copy link
Contributor

dorlaor commented Dec 4, 2018 via email

@WayneWang12
Copy link

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.

@dorlaor
Copy link
Contributor

dorlaor commented Mar 5, 2019 via email

@sumannewton
Copy link

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

@tzach
Copy link
Contributor Author

tzach commented Mar 12, 2019

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.

@JasonZhang95
Copy link

Hope LWT feature will be implemented soon !

@NicolasRouquette
Copy link

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.

@dorlaor
Copy link
Contributor

dorlaor commented Apr 5, 2019 via email

@rhessing
Copy link

rhessing commented Apr 29, 2019

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

@dorlaor
Copy link
Contributor

dorlaor commented Apr 29, 2019 via email

@ghost
Copy link

ghost commented May 20, 2019

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.? :)

@dorlaor
Copy link
Contributor

dorlaor commented May 20, 2019

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)

@ghost
Copy link

ghost commented May 20, 2019

@dorlaor , thank You for quick reply. Can't wait for it! ❤️ You're doing GREAT JOB! 😉

@hdzh
Copy link

hdzh commented Sep 30, 2019

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

@tzach
Copy link
Contributor Author

tzach commented Sep 30, 2019

@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.

@hdzh
Copy link

hdzh commented Sep 30, 2019

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

@dorlaor
Copy link
Contributor

dorlaor commented Sep 30, 2019

To be more accurate, some of the patches got committed yesterday, some on our way in.
c6b66d1

@tzach
Copy link
Contributor Author

tzach commented Oct 1, 2019

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

@kostja
Copy link
Contributor

kostja commented Oct 29, 2019

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.

@kostja kostja closed this as completed Oct 29, 2019
@slivne
Copy link
Contributor

slivne commented Oct 29, 2019

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

@tzach
Copy link
Contributor Author

tzach commented Apr 12, 2020

Experimental flag removed in
9948f54

@tzach tzach closed this as completed Apr 12, 2020
@tzach tzach modified the milestones: 4.x, 4.0 Apr 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests