mirror of https://github.com/apache/cassandra
Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1: Avoid computing prepared statement size for unprepared batches
This commit is contained in:
commit
7d93089a1e
|
|
@ -3,6 +3,7 @@
|
||||||
* Fixed multiple single-node SAI query bugs relating to static columns (CASSANDRA-20338)
|
* Fixed multiple single-node SAI query bugs relating to static columns (CASSANDRA-20338)
|
||||||
* Upgrade com.datastax.cassandra:cassandra-driver-core:3.11.5 to org.apache.cassandra:cassandra-driver-core:3.12.1 (CASSANDRA-17231)
|
* Upgrade com.datastax.cassandra:cassandra-driver-core:3.11.5 to org.apache.cassandra:cassandra-driver-core:3.12.1 (CASSANDRA-17231)
|
||||||
Merged from 4.0:
|
Merged from 4.0:
|
||||||
|
* Avoid computing prepared statement size for unprepared batches (CASSANDRA-20556)
|
||||||
* Fix Dropwizard Meter causes timeouts when infrequently used (CASSANDRA-19332)
|
* Fix Dropwizard Meter causes timeouts when infrequently used (CASSANDRA-19332)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -417,6 +417,11 @@ public class QueryProcessor implements QueryHandler
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Prepared parseAndPrepare(String query, ClientState clientState, boolean isInternal) throws RequestValidationException
|
public static Prepared parseAndPrepare(String query, ClientState clientState, boolean isInternal) throws RequestValidationException
|
||||||
|
{
|
||||||
|
return parseAndPrepare(query, clientState, isInternal, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Prepared parseAndPrepare(String query, ClientState clientState, boolean isInternal, boolean measure) throws RequestValidationException
|
||||||
{
|
{
|
||||||
CQLStatement.Raw raw = parseStatement(query);
|
CQLStatement.Raw raw = parseStatement(query);
|
||||||
|
|
||||||
|
|
@ -441,7 +446,10 @@ public class QueryProcessor implements QueryHandler
|
||||||
res = new Prepared(statement, "", fullyQualified, keyspace);
|
res = new Prepared(statement, "", fullyQualified, keyspace);
|
||||||
else
|
else
|
||||||
res = new Prepared(statement, query, fullyQualified, keyspace);
|
res = new Prepared(statement, query, fullyQualified, keyspace);
|
||||||
res.pstmntSize = measurePstmnt(res);
|
|
||||||
|
// Some prepared statements will not be cached and therefore do not require a pre-computed size.
|
||||||
|
if (measure)
|
||||||
|
res.pstmntSize = measurePstmnt(res);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -188,7 +188,7 @@ public class BatchMessage extends Message.Request
|
||||||
{
|
{
|
||||||
p = QueryProcessor.parseAndPrepare((String) query,
|
p = QueryProcessor.parseAndPrepare((String) query,
|
||||||
state.getClientState().cloneWithKeyspaceIfSet(options.getKeyspace()),
|
state.getClientState().cloneWithKeyspaceIfSet(options.getKeyspace()),
|
||||||
false);
|
false, false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue