When driver receives a response of type Error (e.g. ServerError or Overloaded), it prints "Query succeeded." and never retries, but the error is returned instantly (as if FallthroughRetryPolicy was used).
Steps to reproduce:
Forge an error response frame for driver's request.
Found cause:
In Session:execute_query() the Option<QueryResponse, QueryError> holds Response::Error as Ok and not Err variant, so pattern matching leads to returning that as successful result.
Proposed solution:
Get rid of Response::Error variant and make the aforementioned Option hold Error response as Err(QueryError) variant.
Problem:
When driver receives a response of type
Error
(e.g.ServerError
orOverloaded
), it prints "Query succeeded." and never retries, but the error is returned instantly (as ifFallthroughRetryPolicy
was used).Steps to reproduce:
Forge an error response frame for driver's request.
Found cause:
In
Session:execute_query()
theOption<QueryResponse, QueryError>
holdsResponse::Error
asOk
and notErr
variant, so pattern matching leads to returning that as successful result.Proposed solution:
Get rid of
Response::Error
variant and make the aforementionedOption
holdError
response asErr(QueryError)
variant.496 contains the proposed fix.