Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 18:55
    Zariel commented #1205
  • Jan 31 18:55
    jmhon08 commented #1205
  • Jan 31 18:53
    jmhon08 commented #1205
  • Jan 31 16:12
    mmatczuk closed #1260
  • Jan 31 13:24
    mmatczuk synchronize #1211
  • Jan 31 13:21
    mmatczuk edited #1260
  • Jan 31 13:19
    mmatczuk opened #1260
  • Jan 31 13:06
    lukasmrtvy commented #1205
  • Jan 31 13:03
    lukasmrtvy commented #1205
  • Jan 30 20:47
    jmhon08 commented #1205
  • Jan 30 17:08
    beltran commented #1259
  • Jan 30 13:10
    NWilson opened #1259
  • Jan 29 23:47
    MichaelS11 commented #1139
  • Jan 29 22:53
    adranwit commented #1246
  • Jan 26 23:44
    zachaller commented #1139
  • Jan 26 15:55
    Zariel commented #1253
  • Jan 26 12:35

    Zariel on master

    conn: send heartbeats to detect… (compare)

  • Jan 26 12:35
    Zariel closed #1258
  • Jan 26 12:35
    Zariel closed #1139
  • Jan 26 12:17
    Zariel opened #1258
Herbert Fischer
@hgfischer
I'm preparing a repo to test this
Herbert Fischer
@hgfischer
@Zariel I've packed a nice way to reproduce the issue here: https://github.com/hgfischer/gocql-debug
Basically, it always gets the first row, then fails in the second
I guess some residual thing, like a reused row map, is making MapScan to fail
Herbert Fischer
@hgfischer
I've just added a constant called ReuseMap to main.go to verify something and I found the issue
Herbert Fischer
@hgfischer
@Zariel let me know if you prefer to continue discussing this here or at the GH issue #822
ramrunner 0xff
@ramrunner
Hi guys! thanks for gocql! Maybe a trivial question but i would appreciate some help. I'm writting on a cluster (i have 4 nodes latest cassandra. latest gocql and go1.7) i'm firing around 2k workers and per operation i'm writing to 2 counter tables and one logged batch statement (that hits the same partition on all members of the batch) . Now that batch has data in the order of around 10kb each stmt. I was getting a lot of warnings like "batch of prepared statements foo is of size bar exceeding specified threshold of 5120 by baz. i quadruppled the warning threshold 10x that the batch size on all my nodes but gocql seems unaware of that change. the problem is that a lot of my batched statements are failing eventually. do you have any input?
Chris Bannister
@Zariel
hm, the batch warning statement is coming from cassandra not gocql, there isnt much we can do
ramrunner 0xff
@ramrunner
i know but i changed the cassandra.yaml to a different size and restarted the cluster. but gocql seems to be unaware of that
the only relevant thing that i can see is the MaxPreparedStmts on the cluster config
GQHero
@GQHero
I have a timeout problem using gocql.
gocql: too many query timeouts on the connection
George
@GeorgeMac
Hey I would like to re-iterate the issue GQHero is having above ^. I am using github.com/gemnasium/migrate with its cassandra driver, which wraps gocql. I must be pulling the tip build of gocql as I just installed it fresh. I just wanted to play around with cassandra, so I am running a single node cluster cassandra in a docker container. CreateSession takes 2.5 mins to execute. That is surely a problem? and I imagine it might be somewhat related to GQHeros problem above.
George
@GeorgeMac
Wondering if this is a problem with my Cassandra setup XD Can't seem to bisect to a time in gocql when it wasn't slow.
George
@GeorgeMac
So it looks like it is an issue with running cassandra in docker. gocql tries to obtain a connection to the containers internal IP address. Which is kind of expected if cassandra relays this information back to gocql.
Sorry for my cassandra / gocql rubber ducking session XD
Chris Bannister
@Zariel
@GeorgeMac this is likely gocql/gocql#696
George
@GeorgeMac
Cheers @Zariel !
I find that initially gocql connects on the address I provide, then cassandra in a container broadcasts back its internal docker network IP and gocql tries three attempts, 3 seconds apart on that address, until it finally just uses the connection it had before...
sorry 1 minute apart*
so 3 minutes in total on average to obtain a session.
Oh that issue is longer XD Ill keep reading
Chris Bannister
@Zariel
@GeorgeMac yeah im not sure what do about that, I think in most prod cases this is not likely to happen
but for dev its not ideal
Vincent Rischmann
@vrischmann
Hi. Just wondering what sort of retry policy are people using with gocql today ?
Chris Bannister
@Zariel
@vrischmann im still using the standard one, but I keep meaning to improve retries, its on my list of things that are not good enough in gocql
Nimi Wariboko Jr.
@nemosupremo
Does the gocql driver support UNSET (https://issues.apache.org/jira/browse/CASSANDRA-7304)?
Christine Dodrill
@Xe
Why does https://godoc.org/github.com/gocql/gocql#SslOptions reference a concrete tls.Config and not a pointer to one? Passing it like this will copy the mutex in the tls.Config's sync.Once by value.
Chris Bannister
@Zariel
@Xe looks like a bug
Ashton Kinslow
@Ashtonian
Hello - I was wondering if anyone has an example of any kind of sharing sessions across a large application ?
Edward McFarlane
@afking
Hello, what is the best way to handle authentication for multiple clients? Create multiple authenticated sessions?
Blake Atkinson
@robusto
How do you mean: "multiple clients"? Each instance of your service that communicates with C* should have a single, long-lived session
Chris Bannister
@Zariel
@afking can you elaborate on what you mean?
I dont think you can define different cluster authentication per client?
Blake Atkinson
@robusto
Hi @Zariel , can you elaborate a little bit about your comment on DCAwareRR LB policy?
https://github.com/gocql/gocql/commit/2f9cd6140e3f22d5f7b17955fe6611805eb3a0de#diff-6c19a87ca4beb90f7fb10e2297c83dd5R592
mostly about "calculating a query plan for every query". do you mean building that concatenated local+remote host list?
Chris Bannister
@Zariel
The plan creation should be O(1)
but by building the list of all the hosts in the order we will return them is O(N)
Blake Atkinson
@robusto
thanks for the response, Chris. and we have to build that list of all hosts at Pick() execution time since it can change concurrently? sorry if the questions are basic, I'm just curious how we could address that TODO, if at all.
Chris Bannister
@Zariel
we dont have to, its just simpler too.
Possibly a bit too simple, something using the hostlist COW would be doable, a list for local and remote hosts
Blake Atkinson
@robusto
I imagine it could have some kind of impact for clients using significantly large clusters. COW == "copy-on-write"?
Happy to see this added to the project, btw.
Ralph Caraveo III
@deckarep
Hello friends, I posted a more detailed question to the Google Group for this package but I thought I'd check here. We have a use case where we'd like to implement some circuit-breaking type code when we're doing some gocql writes to C* where we have a situation that some overburdened nodes become too hot and error out. In this case we'd like to implement fallback functionality on the circuit. We're using the TokenAwarePolicy and we'd like to be able to take some stats against the nodes that are erroring out to some threshold. The question is: Does the gocql API have an existing way to get the node that errored out related to the token/partition key? This way --- if our circuit is open for a particular routing key, then we can just do our fallback behavior to not continually overburden the hot nodes until they come back online.
This is a bit of a long winded question but thanks for any heads up on the help here.
NiharDudam
@NiharDudam

Hello, I want to insert/alter tables using go cql. I have a script which will generate all the required cql statements and dumps into a .cql file.

Can I read cql statements from a file using gocql ? I see we have a similar thing using cqlsh client
cqlsh -f <path-to-cql file>

Chang-Paek
@charlie-chang

Hi, I am new to golang and gocql. I have question and can't find way to resolve the connection issue.

Currently I am using cassandra 2.1.5.
cluster := gocql.NewCluster(".....")
cluster.Keyspace = "production"
session, _ := cluster.CreateSession()

then I got error message like ;

panic: no valid connect address for host: [HostInfo connectAddress="<nil>" peer="<nil>" rpc_address="<nil>" broadcast_address="<nil>" preferred_ip="<nil>" connect_addr="0.0.0.0" connect_addr_source="invalid" port=9042 data_centre="datacenter1" rack="rack1" host_id="*" version="v2.1.5" state=UP num_tokens=1]. Is your cluster configured correctly?

When I test this code with cassandra 3.1 , it works but 2.1.5 it doesn't

system.local's schema is different between two versions and I think it cause the problem.

Is there any way to resolve this ?

Mehryar Maalem
@mehryar-m
Hey all, I'm trying to perform an insert operation using gocql to a cassandra table that contains a list of UDTs and I cannot figure out where I am messing up. I wrote a question here: https://stackoverflow.com/questions/52844147/inserting-an-array-of-user-defined-types-into-cassandra-using-gocql Any help would be very appreciated :)
Rishabh Gupta
@prishabh
I am trying to run go test -run UnmarshalDate but it is showing no test is present, sorry for the noobie question.
Rishabh Gupta
@prishabh
Thanks guys, my bad
there is a concept of tags in test files, now I am able to run it.