question

vkayanala_42513 avatar image
vkayanala_42513 asked Erick Ramirez edited

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

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

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