-
Notifications
You must be signed in to change notification settings - Fork 42
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
Maximum query array size of client.executeBatch #68
Comments
As far as I know, there is no limit on batches at protocol level or CQL. The Another consideration is that, to batch a large amount of queries, you create in memory a large number of queries and parameters. Also, you send all that data through the wire "serially"... |
There seems to be a limit. To give you an idea of the issue, we are sending for a given primary key around 150,000 Could you tell us what their options in And by the way, many thanks for this excellent piece of software. |
Thanks!
I still think it is not a good idea to batch such a large amount of queries, consider that each query should take on average 50 bytes (depending on the size of the query and parameters) multiplied by 150,000 queries is more than 7Mb of data on memory (that then is transfered over the wire). Also, if possible, use non atomic batches (atomic batches have a performance impact): client.executeBatch(queries, consistency, {atomic: false}, callback); If you are getting an error from the |
Hi Jorge, Could you provide us with a short comment on what the option |
Its atomic in database terms: if any part of the batch succeeds, all of it will. More info: Atomic batches in Cassandra |
I'm seeing the same thing. It took me a while to track it down because only a few of my The problem stems from the following code: FrameWriter.prototype.writeShort = function(num) {
var buf = new Buffer(2);
buf.writeUInt16BE(num, 0);
this.buffers.push(buf);
}; The parameter Now, with no knowledge of the underlying Cassandra wire protocol, my question is: is it possible to step up this value to perhaps |
@jorgebay - Wouldn't it be more descriptive to say that if any part of the batch fails, the entire batch fails? I suppose the two are equivalent, but typically "what happens when something fails?" is the main concern. |
Hi,
We would like to know the maximum query array size that is possible to send to
client.executeBatch()
. We think it is a good idea to document that because we are facing problems with sizes bigger than 4000 +.We are addressing that for the moment by splicing the array.
The text was updated successfully, but these errors were encountered: