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 2019 18:55
    Zariel commented #1205
  • Jan 31 2019 18:55
    jmhon08 commented #1205
  • Jan 31 2019 18:53
    jmhon08 commented #1205
  • Jan 31 2019 16:12
    mmatczuk closed #1260
  • Jan 31 2019 13:24
    mmatczuk synchronize #1211
  • Jan 31 2019 13:21
    mmatczuk edited #1260
  • Jan 31 2019 13:19
    mmatczuk opened #1260
  • Jan 31 2019 13:06
    lukasmrtvy commented #1205
  • Jan 31 2019 13:03
    lukasmrtvy commented #1205
  • Jan 30 2019 20:47
    jmhon08 commented #1205
  • Jan 30 2019 17:08
    beltran commented #1259
  • Jan 30 2019 13:10
    NWilson opened #1259
  • Jan 29 2019 23:47
    MichaelS11 commented #1139
  • Jan 29 2019 22:53
    adranwit commented #1246
  • Jan 26 2019 23:44
    zachaller commented #1139
  • Jan 26 2019 15:55
    Zariel commented #1253
  • Jan 26 2019 12:35

    Zariel on master

    conn: send heartbeats to detect… (compare)

  • Jan 26 2019 12:35
    Zariel closed #1258
  • Jan 26 2019 12:35
    Zariel closed #1139
  • Jan 26 2019 12:17
    Zariel opened #1258
ramrunner 0xff
@ramrunner
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.
sateesh kumar
@sateeshv2011_twitter

Can we use both tokenaware and dcaware Roundrobin policy using GOLANG cassandra driver ?

TokenAwarePolicy(DCAwareRoundRobinPolicy.builder()).build()))

if yes, how can we use ?

cassandra version 3.11.4
Pinank Lakhani
@Pinank
Hello

I am getting following error while trying to create session from cql,
"Consistency level ANY is not supported for this operation. Supported consistency levels are: ONE, LOCAL_QUORUM, LOCAL_ONE"

I am using "Amazon Managed Apache Cassandra Service".

I have set following properties,

clusterConfig := gocql.NewCluster("<HOST>")
clusterConfig.Authenticator = gocql.PasswordAuthenticator{Username: "Username", Password: "Password"}
clusterConfig.SslOpts = &gocql.SslOptions{
CaPath: "./AmazonRootCA1.pem",
}
clusterConfig.Consistency = gocql.LocalQuorum
clusterConfig.ConnectTimeout = time.Second * 10
clusterConfig.ProtoVersion = 3
clusterConfig.DisableInitialHostLookup = true
clusterConfig.Keyspace = "TestDB"
clusterConfig.NumConns = 3
session, err := clusterConfig.CreateSession()
if err != nil {
fmt.Println("err>", err)
}
return session

Pinank Lakhani
@Pinank
Please help me out
Scott
@rustysys-dev
I cannot find anything on the error missing K_EXISTS at '<missiing ' anyone have an idea what K_EXISTS is?
Reginald McDonald
@reggiemcdonald

Hello! I was looking at the BatchObserver for gocql and came across this in the comments:
https://github.com/gocql/gocql/blob/34081eda590e85c1fdbd412012340d9ee2cf3aff/session.go#L2007

It says that this is called for every query in the batch. I just wanted to clarify whether it is the BatchObserver thats called for each query, or the QueryObserver?

Иван Сердюк
@oceanfish81_twitter
Anyone interested to help with compilation bugs, when I would track down/report those, with https://go.googlesource.com/gollvm/ ?