java-driver icon indicating copy to clipboard operation
java-driver copied to clipboard

Add note about guardrails on `WHERE … IN … `

Open emeliawilkinson24 opened this issue 1 year ago • 3 comments

For DOC-4062 (private)

Issue: One of my customer has encountered an issue while using more than 25 values in the IN clause.

Answer: “It is invalid pattern with Cassandra 4 and guardails. The problem is the load is transferred from the client to the coordinator. They should go with parallal queries and reduce on the client side: faster and dstribute the load on the nodes”

emeliawilkinson24 avatar Dec 04 '23 19:12 emeliawilkinson24

this looks good to me.

@absurdfarce

michaelsembwever avatar Apr 06 '24 07:04 michaelsembwever

I do have a few questions. @michaelsembwever I don't know if you can help with some/all of these... I can follow up other places if need be.

  1. This change appears to stem from the work on CEP-3. Does this only apply to OSS C* or does it also apply to DSE and/or Astra as well?
  2. If it's just a C* thing is there a version dependency on when users need to worry about this behaviour? It looks like most of the CEP-3 work came in with 4.1... should we limit this advice to specific versions (or describe differing behaviours for impls before and after CEP-3 came along)?
  3. These docs reference a limit of 25 values in an IN clause. Is that a fixed limit or is it configurable? If it's configurable we might want to provide guidance to the user about how to configure it.
  4. Seems like we might want to provide a pointer to other information about these constraints. This could take the form of a pointer to CEP-3 but if there are other resources that explain this in a user-friendly way we should consider those instead.

absurdfarce avatar Apr 08 '24 19:04 absurdfarce

I agree with your concerns. I think the easiest way to address this is to change the language to be informative about server-side restrictions that the user may hit, reference the correct cassandra docs. From the driver's PoV these restrictions are ultimately unknown.

michaelsembwever avatar Apr 08 '24 20:04 michaelsembwever