@@ -132,6 +132,15 @@ Router public API
132132 * ``timeout `` — a request timeout, in seconds. If the ``router `` cannot identify a
133133 shard with the specified ``bucket_id ``, it will retry until the timeout is reached.
134134
135+ * ``request_timeout `` (since ``vshard `` 0.1.28) — timeout in seconds that serves as a protection against hung replicas.
136+ The parameter is used in the read requests only (``mode=read ``).
137+ It is necessary to pass the ``request_timeout `` and ``timeout `` parameters together, with the following requirement:
138+ ``timeout > request_timeout ``.
139+
140+ The ``timeout `` parameter controls how much time a single request attempt may take.
141+ When this time is over (the ``TimedOut `` error is raised), router retries the request on the next replica as long
142+ as the ``timeout `` value is not elapsed.
143+
135144 * other :ref: `net.box options <net_box-options >`, such as ``is_async ``,
136145 ``buffer ``, ``on_push `` are also supported.
137146
@@ -163,12 +172,16 @@ Router public API
163172 optional attribute containing a message with the human-readable error description,
164173 and other attributes specific for the error code.
165174
175+ .. reference_vshard_note_start
176+
166177 .. note ::
167178
168- Any write requests that are intended to be executed repeatedly should be idempotent.
179+ Any write requests that are intended to be executed repeatedly (for example, retried after an error) should be idempotent.
169180 The operations' idempotency ensures that the change is applied **only once **.
170181 Read more: :ref: `<vshard-deduplication >`.
171182
183+ .. reference_vshard_note_end
184+
172185 **Examples: **
173186
174187 To call ``customer_add `` function from ``vshard/example ``, say:
@@ -205,6 +218,13 @@ Router public API
205218 * ``timeout `` — a request timeout, in seconds.If the ``router `` cannot identify a
206219 shard with the specified ``bucket_id ``, it will retry until the timeout is reached.
207220
221+ * ``request_timeout `` (since ``vshard `` 0.1.28) — timeout in seconds that serves as a protection against hung replicas.
222+ It is necessary to pass the ``request_timeout `` and ``timeout `` parameters together, with the following requirement:
223+ ``timeout > request_timeout ``.
224+ The ``timeout `` parameter controls how much time a single request attempt may take.
225+ When this time is over (the ``TimedOut `` error is raised), router retries the request on the next replica as long
226+ as the ``timeout `` value is not elapsed.
227+
208228 * other :ref: `net.box options <net_box-options >`, such as ``is_async ``,
209229 ``buffer ``, ``on_push `` are also supported.
210230
@@ -254,6 +274,10 @@ Router public API
254274 optional attribute containing a message with the human-readable error description,
255275 and other attributes specific for this error code.
256276
277+ .. include :: /reference/reference_rock/vshard/vshard_router.rst
278+ :start-after: reference_vshard_note_start
279+ :end-before: reference_vshard_note_end
280+
257281.. _router_api-callre :
258282
259283.. function :: vshard.router.callre(bucket_id, function_name, {argument_list}, {options})
@@ -273,6 +297,13 @@ Router public API
273297 * ``timeout `` — a request timeout, in seconds. If the ``router `` cannot identify a
274298 shard with the specified ``bucket_id ``, it will retry until the timeout is reached.
275299
300+ * ``request_timeout `` (since ``vshard `` 0.1.28) — timeout in seconds that serves as a protection against hung replicas.
301+ It is necessary to pass the ``request_timeout `` and ``timeout `` parameters together, with the following requirement:
302+ ``timeout > request_timeout ``.
303+ The ``timeout `` parameter controls how much time a single request attempt may take.
304+ When this time is over (the ``TimedOut `` error is raised), router retries the request on the next replica as long
305+ as the ``timeout `` value is not elapsed.
306+
276307 * other :ref: `net.box options <net_box-options >`, such as ``is_async ``,
277308 ``buffer ``, ``on_push `` are also supported.
278309
0 commit comments