You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Paused node does not respond to queries, but the TCP connection is not closed. Driver will notice that the node is down after some time, thanks to the keepaliver
Before the driver notices that the connections no longer work, we issue schema changing query
Query succeeds, so the driver tries to await schema agreement (because automatic schema agreement waiting on DDL is enabled by default)
Driver uses "iter_working_connections" and send a schema version fetch on each of them
Paused node doesn't respond, so driver keeps waiting on it.
Keepaliver notices the nodes is down and shuts down the connection
schema version fetch request returns broken connection error
Error propagates, and so driver returns an error for the schema changing query
The same thing is possible for PREPARE path - it also uses "iter_working_connection".
I think the fix is to ignore broken connection errors - we want to issue the query on working connection, so if the connection is no longer working we should ignore it.
We actually already do this for USE KEYSPACE path: see fn use_keyspace_result. We should use similar logic for PREPARE and schema awaiting.
Another minor thing regarding paused node: if we send some query to it, we will wait for response until client-side timeout passes. That means we won't use retries at all.
I wonder if this is the correct behavior (which means the user should use speculative execution to prevent that), or maybe we should have a client-side timeout for a single attempt?
Or maybe the main client-side timeout should be for a single attempt?
Test scenario:
SchemaAgreementError(RequestError(BrokenConnectionError(BrokenConnectionError(KeepaliveTimeout(127.0.2.1)))))
test draft: https://github.com/soyacz/scylla-rust-driver/blob/hackathon-schema-agreement/scylla/tests/ccm_integration/schema_agreement.rs
The text was updated successfully, but these errors were encountered: