mirror of https://github.com/apache/cassandra
Error when using hsha w/ unlimited rpc_max_threads
Patch by Tyler Hobbs; reviewed by Mike Adamson for CASSANDRA-8116
This commit is contained in:
parent
46f43cee72
commit
1b332bc1c0
|
|
@ -1,5 +1,7 @@
|
|||
2.0.12:
|
||||
* Pig: Remove errant LIMIT clause in CqlNativeStorage (CASSANDRA-8166)
|
||||
* Throw ConfigurationException when hsha is used with the default
|
||||
rpc_max_threads setting of 'unlimited' (CASSANDRA-8116)
|
||||
|
||||
|
||||
2.0.11:
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ import java.util.*;
|
|||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.primitives.Longs;
|
||||
import org.apache.cassandra.thrift.ThriftServer;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
|
@ -333,6 +334,12 @@ public class DatabaseDescriptor
|
|||
if (conf.native_transport_max_frame_size_in_mb <= 0)
|
||||
throw new ConfigurationException("native_transport_max_frame_size_in_mb must be positive");
|
||||
|
||||
// fail early instead of OOMing (see CASSANDRA-8116)
|
||||
if (ThriftServer.HSHA.equals(conf.rpc_server_type) && conf.rpc_max_threads == Integer.MAX_VALUE)
|
||||
throw new ConfigurationException("The hsha rpc_server_type is not compatible with an rpc_max_threads " +
|
||||
"setting of 'unlimited'. Please see the comments in cassandra.yaml " +
|
||||
"for rpc_server_type and rpc_max_threads.");
|
||||
|
||||
/* end point snitch */
|
||||
if (conf.endpoint_snitch == null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -34,9 +34,9 @@ import org.apache.thrift.transport.TTransportFactory;
|
|||
public class ThriftServer implements CassandraDaemon.Server
|
||||
{
|
||||
private static Logger logger = LoggerFactory.getLogger(ThriftServer.class);
|
||||
protected final static String SYNC = "sync";
|
||||
protected final static String ASYNC = "async";
|
||||
protected final static String HSHA = "hsha";
|
||||
public final static String SYNC = "sync";
|
||||
public final static String ASYNC = "async";
|
||||
public final static String HSHA = "hsha";
|
||||
|
||||
protected final InetAddress address;
|
||||
protected final int port;
|
||||
|
|
|
|||
Loading…
Reference in New Issue