]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
cassandra: Handle CASS_ERROR_SERVER_WRITE_FAILURE also as "uncertain write"
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 28 Nov 2019 19:23:15 +0000 (21:23 +0200)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Fri, 13 Dec 2019 09:56:27 +0000 (09:56 +0000)
This error apparently doesn't happen often, but it seems to be a per-node
failure so some Cassandra nodes could have written the change.

src/lib-sql/driver-cassandra.c

index daddaeca3cefab2eda25f48b1c82380446cb086f..4d691e3aaa6e6b0ae54bcf47626be5b75df38db0 100644 (file)
@@ -1157,6 +1157,7 @@ static void query_callback(CassFuture *future, void *context)
                   not. Also _SERVER_UNAVAILABLE could have actually written
                   enough copies of the data for the query to succeed. */
                result->api.error_type = error == CASS_ERROR_SERVER_WRITE_TIMEOUT ||
+                       error == CASS_ERROR_SERVER_WRITE_FAILURE ||
                        error == CASS_ERROR_SERVER_UNAVAILABLE ||
                        error == CASS_ERROR_LIB_REQUEST_TIMED_OUT ?
                        SQL_RESULT_ERROR_TYPE_WRITE_UNCERTAIN :