Question

There is a read request timeout that can be specified in cassandra.yaml:

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

I need some clarifications regarding this timeout.

According to the client request documentation, the read request can be of two types: External request or Background repair request.

Q1: Is this timeout imposed on both type of requests and what happens in each case?

Now, focusing on just the external reads. Again, in the documentation linked above, it says that during the read, a background process is kicked off to maintain consistency.

Q2: For an external read request, does the timeout include the time taken for the background process?

I am asking these question because I want to impose a timeout on each read request, but I don't want it to affect any other background process linked to reads.

Était-ce utile?

La solution

Q1: I believe the background read repair will use the read_request_timeout_in_ms for it’s operation.

Q2: For external requests from clients, the time taken for background repair is usually in the “background” and does not count towards the timeout value. [1] “read_request_timeout_in_ms” timing is started when the coordinator gets a request. For consistency less than ALL, if responses are received from the required number of replicas before the timeout value, the response is returned to the client. For consistency level ALL the response is not returned until the background read repair completes [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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top