ScanCAS Not works when needed

27 views
Skip to first unread message

soubhagya panda

unread,
Mar 13, 2023, 3:59:34 AM3/13/23
to gocql
Hi,

I use ScanCAS in INSERT...IF NOT EXIST Query . Some times it fails in new data insert . ScanCAS() gives false if data not exist .

This fails gives 30% in production use.can any one help me out with this . Wheather i use MapScanCAS(mapdata) or any this else . 

I use the query like 

applied,err:=Session.Query("INSERT... IF NOT EXISTS",id1,id2,id3,amount,).ScanCAS()
Actually it should give true when a new data is insert , but it gives false  

Thanks
Soubhagya

soubhagya panda

unread,
Mar 13, 2023, 6:41:55 AM3/13/23
to gocql
Please help me out with this problem 

Thanks 

Sachin Raut

unread,
Mar 13, 2023, 4:14:21 PM3/13/23
to soubhagya panda, gocql
Could you try passing 4 "nil" parameters to ScanCAS(nil,nil,nil,nil)

Have a look at this thread, it might be helpful

regards
Sachin 

--
You received this message because you are subscribed to the Google Groups "gocql" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gocql+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gocql/85b87d17-9093-49cf-bfcf-3ea79f134381n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages