单节点cassandra中的OverloadException

时间:2018-05-28 08:52:29

标签: apache cassandra cassandra-3.0

我通读了此页:https://docs.datastax.com/en/cassandra/3.0/cassandra/operations/opsRepairNodesHintedHandoff.html并确认OverloadedException中的Cassandra是由于

The coordinator tracks how many hints it is currently writing, and if the number increases too much, the coordinator refuses writes and throws the OverloadedException exception.

但是我使用单个节点并且能够经常获得Overload异常,那么在 singlenode 中使用Consistency as 1 and ReplicationFactor as 1进行重载异常的原因是什么?

已编辑:

总提示正在进行JMX

enter image description here

enter image description here

I checked in the code :

 private static void checkHintOverload(InetAddressAndPort destination)
    {
        // avoid OOMing due to excess hints.  we need to do this check even for "live" nodes, since we can
        // still generate hints for those if it's overloaded or simply dead but not yet known-to-be-dead.
        // The idea is that if we have over maxHintsInProgress hints in flight, this is probably due to
        // a small number of nodes causing problems, so we should avoid shutting down writes completely to
        // healthy nodes.  Any node with no hintsInProgress is considered healthy.
        if (StorageMetrics.totalHintsInProgress.getCount() > maxHintsInProgress
                && (getHintsInProgressFor(destination).get() > 0 && shouldHint(destination)))
        {
            throw new OverloadedException("Too many in flight hints: " + StorageMetrics.totalHintsInProgress.getCount() +
                                          " destination: " + destination +
                                          " destination hints: " + getHintsInProgressFor(destination).get());
        }
    }

1)这是获取Overloaded异常的唯一方法吗? 2)为什么我在单个节点中获得Overload异常? 3)在单节点中调用此checkHintOverload方法时?

注意

1)我的Keyspace已经配置了NetworkTopologyStrategy,这是一个原因吗? :CREATE KEYSPACE test WITH replication = {'class': 'NetworkTopologyStrategy', 'datacenter_1': '1'} AND durable_writes = true;

2)hinted_handoff =在cassandra.yaml中启用,我仍然想知道它会触发单节点中的提示,如果是这样,为什么?

3)一致性级别是此单个节点中的仲裁

这三个参数中的任何一个都可能是这个的原因吗?

谢谢,
哈利

0 个答案:

没有答案