Description
Reproducer:
// submit query1 Future<?> query1_result = client.submitAsync(<query1 that takes 10s>, RequestOptions.build().overrideRequestId(UNIQUE_UUID_1).create()); // Add buffer wait to ensure server gets time to start query1 and submit query2 Thread.sleep(100); try { ResultSet query2_resultSet = this.client.submit(<query2 that takes 2s>, RequestOptions.build().overrideRequestId(UNIQUE_UUID_1).create()); query2_resultSet.all().get(); } catch(Exception ex) { // ignore } // This never completes as the ResultSet tracked by driver at connection is // overridden when we submit the second query with same request id. // The ResultSet of the first query is orphaned and not updated, leaving the get() // to wait forever. query1_result.get();
I think the driver should reject the query when submitting the same request to prevent this from happening.