-
Notifications
You must be signed in to change notification settings - Fork 58
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
Batch too large #90
Comments
Two notes from my end.
|
@mmatczuk Thanks for the replay. I found a way to get the host from the query: stmt, args := buildQuery(metric)
query := scylla.session.Query(stmt, args...)
hostID := scylla.selector.Pick(query)().Info().HostID() And then I batch according to the host. NOTE: Consistency ONE, Replication Factor 1 |
Cool. |
I opened an issue in gocqlx I invite you to contribute the code to do the splitting to dbutil package under gocqlx. |
Nice! I was thinking whether using ShuffleHosts or similar could cause problems, but even if the host selection policy picks a non-primary replica, the Scylla node should still have all the data to service the batch locally. Still, I'd like to make the host/shard available to users with proper API somehow - it would help with implementing host selection policies outside the gocql package as well. |
original issue is solved. |
What version of Scylla or Cassandra are you using?
Scylla 4.4.6-0.20211028.dd018d4de
What version of Gocql are you using?
v1.5.0
What version of Go are you using?
1.17.1 linux/amd64
What did you do?
I watched a couple of talks about inserting 1 milion metrics a second in cassandra/scylla. I'm trying to replicate the result in go and have hit a wall. In the mentioned talks it is said that with the settings that I have set I would be able have 10000 queries in one batch. After altering demo code to use just one partition the warning goes away. KairosDB, that is mentioned in the talk, is creating batches based on their destination node/shard. To my knowledge this is not available in gocql driver (#75 ) unlike DataStax driver for java.
Did I miss anything? Is it possible to push 1 million request per second with go?
What did you expect to see?
I expected to be able to push 10000 queries in one batch into scylla
What did you see instead?
Steps to Replicate
scylla.yaml
docker-compose.yaml
GO
The text was updated successfully, but these errors were encountered: