Skip to content

Commit

Permalink
Fix cassandra-stress in simplenative mode with prepared statements
Browse files Browse the repository at this point in the history
patch by Dmitry Bychkov; reviewed by Stefan Miklosovic and Brandon Williams for CASSANDRA-18744
  • Loading branch information
dmi0 authored and smiklosovic committed Nov 29, 2023
1 parent 8dc32c5 commit 0f2af6a
Show file tree
Hide file tree
Showing 8 changed files with 115 additions and 138 deletions.
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
4.0.12
* Fix cassandra-stress in simplenative mode with prepared statements (CASSANDRA-18744)
* Fix filtering system ks sstables for relocation on startup (CASSANDRA-18963)
* Remove completed coordinator sessions (CASSANDRA-18903)
* Make StartupConnectivityChecker only run a connectivity check if there are no nodes which are running a version prior to Cassandra 4 (CASSANDRA-18968)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ public void testNodesArg()

String hostNameAndPort = String.format("localhost:%s", nativePort);
invokeAndAssertCleanExit(baseArgs, "-node", hostNameAndPort);

invokeAndAssertCleanExit(baseArgs, "-mode", "simplenative", "prepared", "cql3");
invokeAndAssertCleanExit(baseArgs, "-mode", "simplenative", "cql3");
invokeAndAssertCleanExit(baseArgs, "-mode", "native", "cql3");
invokeAndAssertCleanExit(baseArgs, "-mode", "native", "unprepared", "cql3");
}

void invokeAndAssertCleanExit(String[] baseArgs, String ... extraArgs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ protected List<Object> getQueryParameters(byte[] key)
}

@Override
protected CqlRunOp<Integer> buildRunOp(ClientWrapper client, String query, Object queryId, List<Object> params, ByteBuffer key)
protected CqlRunOp<Integer> buildRunOp(QueryExecutor<?> queryExecutor, List<Object> params, ByteBuffer key)
{
return new CqlRunOpAlwaysSucceed(client, query, queryId, params, key, 1);
return new CqlRunOpAlwaysSucceed(queryExecutor, params, key, 1);
}

public boolean isWrite()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ protected String buildQuery()
}

@Override
protected CqlRunOp<Integer> buildRunOp(ClientWrapper client, String query, Object queryId, List<Object> params, ByteBuffer key)
protected CqlRunOp<Integer> buildRunOp(QueryExecutor<?> queryExecutor, List<Object> params, ByteBuffer key)
{
return new CqlRunOpTestNonEmpty(client, query, queryId, params, key);
return new CqlRunOpTestNonEmpty(queryExecutor, params, key);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ protected List<Object> getQueryParameters(byte[] key)
}

@Override
protected CqlRunOp<Integer> buildRunOp(ClientWrapper client, String query, Object queryId, List<Object> params, ByteBuffer key)
protected CqlRunOp<Integer> buildRunOp(QueryExecutor<?> queryExecutor, List<Object> params, ByteBuffer key)
{
return new CqlRunOpAlwaysSucceed(client, query, queryId, params, key, 1);
return new CqlRunOpAlwaysSucceed(queryExecutor, params, key, 1);
}

public boolean isWrite()
Expand Down

0 comments on commit 0f2af6a

Please sign in to comment.