mirror of https://github.com/apache/cassandra
Merge branch 'cassandra-4.1' into trunk
This commit is contained in:
commit
a68c0983b4
|
|
@ -107,6 +107,7 @@ Merged from 4.1:
|
|||
* Streaming progress virtual table lock contention can trigger TCP_USER_TIMEOUT and fail streaming (CASSANDRA-18110)
|
||||
* Fix perpetual load of denylist on read in cases where denylist can never be loaded (CASSANDRA-18116)
|
||||
Merged from 4.0:
|
||||
* Log warning message on aggregation queries without key or on multiple keys (CASSANDRA-18219)
|
||||
* Fix the output of FQL dump tool to properly separate entries (CASSANDRA-18215)
|
||||
* Add cache type information for maximum memory usage warning message (CASSANDRA-18184)
|
||||
* Fix NPE in fqltool dump on null value (CASSANDRA-18113)
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ package org.apache.cassandra.cql3.statements;
|
|||
import java.nio.ByteBuffer;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.google.common.base.MoreObjects;
|
||||
|
|
@ -74,6 +75,7 @@ import org.apache.cassandra.transport.ProtocolVersion;
|
|||
import org.apache.cassandra.transport.messages.ResultMessage;
|
||||
import org.apache.cassandra.utils.ByteBufferUtil;
|
||||
import org.apache.cassandra.utils.FBUtilities;
|
||||
import org.apache.cassandra.utils.NoSpamLogger;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
|
@ -98,6 +100,7 @@ import static org.apache.cassandra.utils.Clock.Global.nanoTime;
|
|||
public class SelectStatement implements CQLStatement.SingleKeyspaceCqlStatement
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(SelectStatement.class);
|
||||
private static final NoSpamLogger noSpamLogger = NoSpamLogger.getLogger(SelectStatement.logger, 1, TimeUnit.MINUTES);
|
||||
|
||||
public static final int DEFAULT_PAGE_SIZE = 10000;
|
||||
|
||||
|
|
@ -430,10 +433,14 @@ public class SelectStatement implements CQLStatement.SingleKeyspaceCqlStatement
|
|||
if (!restrictions.hasPartitionKeyRestrictions())
|
||||
{
|
||||
warn("Aggregation query used without partition key");
|
||||
noSpamLogger.warn(String.format("Aggregation query used without partition key on table %s.%s, aggregation type: %s",
|
||||
keyspace(), table(), aggregationSpec.kind()));
|
||||
}
|
||||
else if (restrictions.keyIsInRelation())
|
||||
{
|
||||
warn("Aggregation query used on multiple partition keys (IN restriction)");
|
||||
noSpamLogger.warn(String.format("Aggregation query used on multiple partition keys (IN restriction) on table %s.%s, aggregation type: %s",
|
||||
keyspace(), table(), aggregationSpec.kind()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue