java-driver
java-driver copied to clipboard
Add note about guardrails on `WHERE … IN … `
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”
this looks good to me.
@absurdfarce
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.
- 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?
- 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)?
- 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.
- 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.
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.