timeout - cassandra 中的 read_request_timeout_in_ms

标签 timeout cassandra datastax-java-driver

可以在 cassandra.yaml 中指定读取请求超时:

# How long the coordinator should wait for read operations to complete
read_request_timeout_in_ms: 10000

我需要一些有关此超时的说明。

根据client request documentation ,读取请求可以有两种类型:外部请求或后台修复请求。

问题 1:此超时是否强加于两种类型的请求以及每种情况下会发生什么情况?

现在,只关注外部读取。同样,在上面链接的文档中,它说在读取过程中,会启动后台进程以保持一致性。

Q2:对于外部读取请求,超时是否包括后台进程所花费的时间?

我问这些问题是因为我想对每个读取请求施加超时,但我不希望它影响与读取相关的任何其他后台进程。

最佳答案

Q1:我相信后台读取修复会使用 read_request_timeout_in_ms 进行操作。

Q2:对于来自客户端的外部请求,后台修复所花费的时间通常在“后台”,不计入超时值。 [1] “read_request_timeout_in_ms”计时在协调器收到请求时开始。对于小于 ALL 的一致性,如果在超时值之前从所需数量的副本收到响应,则将响应返回给客户端。对于一致性级别 ALL,在后台读取修复完成之前不会返回响应 [2]。

[1] http://www.datastax.com/documentation/cassandra/1.2/webhelp/?pagename=docs&version=1.2&file=#cassandra/architecture/../dml/dml_config_consistency_c.html
[2] http://wiki.apache.org/cassandra/ReadRepair

关于timeout - cassandra 中的 read_request_timeout_in_ms,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19014524/

相关文章:

cassandra - 我的大量表 (2k+) 是否会导致我的写入超时异常?

powershell - 如何在 powershell 命令上设置超时?

javascript - 在 DOM 就绪事件上加载大量脚本片段的模式,而 IE 8 不会弹出脚本超时警告

node.js - 长 POST node.js 上的套接字超时

Cassandra 不可用异常 : Cannot achieve consistency level LOCAL_ONE

Cassandra Cql 范围选择

java - Cassandra删除操作有时无法正常工作,删除后无法选择数据

amazon-web-services - 无法连接到端口 22 上的 AWS 实例

cassandra - 选择 Cassandra 中的所有性能

cassandra - 如果发生读取超时,如何在 Cassandra 中重试