dcapwell commented on code in PR #4081: URL: https://github.com/apache/cassandra/pull/4081#discussion_r2043274335
########## test/distributed/org/apache/cassandra/distributed/test/cql3/StatefulASTBase.java: ########## @@ -496,11 +499,43 @@ protected ByteBuffer[][] executeQuery(IInstance instance, int fetchSize, Consist .findAny() .get(); ss.setHost(host); - ResultSet result = session.execute(ss); + // Only SELECT is known safe to retry, as Mutations might not be idempotent! + boolean allowRetries = stmt.kind() == Statement.Kind.SELECT; + ResultSet result = !allowRetries ? session.execute(ss) + : executeWithRetries(ss, 3); return getRowsAsByteBuffer(result); } } + private ResultSet executeWithRetries(SimpleStatement ss, int maxTries) + { + Backoff backoff = null; + Throwable lastError = null; + for (int i = 0; i < maxTries; i++) + { + try + { + return session.execute(ss); + } + catch (Throwable t) Review Comment: thanks for this feedback! Made the change, which then gives me access to the error map (instance -> reason); so i enhanced the error messaging to show the reason ``` Caused by: java.lang.AssertionError: Request failed after 3 attempts! failed from={/127.0.0.3=INDEX_BUILD_IN_PROGRESS} ``` @maedhroz why are we rebuilding the index?!!?!?!?1 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For additional commands, e-mail: pr-h...@cassandra.apache.org