Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

Buck avatar image
Buck asked ·

Where can we specify THROW_ON_OVERLOAD=true in the Java driver?

On the cassandra.apache website we talk about a way to improve back pressure. (https://cassandra.apache.org/blog/Improving-Apache-Cassandras-Front-Door-and-Backpressure.html)

It is related to CASSANDRA-15013. There they talk about a setting THROW_ON_OVERLOADED which should be set to true, in order for the node to throw OverloadedException.

How/Where can we set the THROW_ON_OVERLOADED property with the DataStax java-driver?

java driver
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered ·

The Java driver won't be adopting THROW_ON_OVERLOAD as a startup option but instead gracefully handle the backpressure in JAVA-2589 when it gets implemented.

The idea is for the driver to stop sending requests when Netty's Channel#isWritable() returns false and wait for channelWritabilityChanged() before sending requests again.

This means that configuring the client startup option will not be required. Cheers!

2 comments Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Great stuff! Thank you for your answer Erick.

0 Likes 0 ·
Not a problem, mate. And welcome to the community. Cheers!
0 Likes 0 ·