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

vkayanala_42513 avatar image
vkayanala_42513 asked ·

What is the difference between WriteTimeoutException and WriteFailureException?

Two kinds of Cassandra Write exceptions in General right?

  • com.datastax.driver.core.exceptions.WriteTimeoutException
  • com.datastax.driver.core.exceptions.WriteFailureException

What is the difference between these two exceptions? and In what scenarios each one of these occurs?

driverjava
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 ·

@vkayanala_42513 A WriteTimeoutException is a reported by the Cassandra coordinator when a write request does not complete within write_request_timeout_in_ms.

A WriteFailureException is thrown when replicas report write failures to the coordinator. They were introduced in Apache Cassandra 2.2 (CASSANDRA-8592). At this point, I'm aware that a write failure is triggered when C* gets batches which are too large. Cheers!

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.