Skip to content

Commit 85d5ad4

Browse files
committed
draft
1 parent 42b064a commit 85d5ad4

File tree

2 files changed

+36
-2
lines changed

2 files changed

+36
-2
lines changed

doc/platform/sharding/vshard_admin.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ In this case:
594594

595595
A write request can be executed repeatedly without a check in two cases:
596596
- The request is idempotent.
597-
- It's known for sure that the previous request errored before executing any write operations.
597+
- It's known for sure that the previous request raised an error before executing any write operations.
598598
For example, ER_READONLY was thrown by the server.
599599
In this case, we know that the request couldn't complete due to server in read-only mode.
600600

@@ -603,6 +603,11 @@ In this case:
603603
To ensure that the write requests (INSERT, UPDATE, UPSERT, and autoincrement) are idempotent,
604604
you should implement a check that the request is applied for the first time.
605605

606+
.. note::
607+
608+
There is no built-in deduplication check in Tarantool.
609+
Currently, deduplication can be only implemented by the user in the application code.
610+
606611
For example, when you add a new tuple to a space, you can use a unique insert ID to check the request.
607612
In the example below within a single transaction:
608613

doc/reference/reference_rock/vshard/vshard_router.rst

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,14 @@ 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`` — timeout in seconds
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.
136143

137144
* other :ref:`net.box options <net_box-options>`, such as ``is_async``,
138145
``buffer``, ``on_push`` are also supported.
@@ -211,6 +218,17 @@ Router public API
211218
* ``timeout`` — a request timeout, in seconds.If the ``router`` cannot identify a
212219
shard with the specified ``bucket_id``, it will retry until the timeout is reached.
213220

221+
.. vshard_request_timeout_note_start
222+
223+
* ``request_timeout`` (since ``vshard`` 0.1.28) — timeout in seconds that serves as a protection against hung replicas.
224+
It is necessary to pass the ``request_timeout`` and ``timeout`` parameters together, with the following requirement:
225+
``timeout > request_timeout``.
226+
The ``timeout``parameter controls how much time a single request attempt may take.
227+
When this time is over (the ``TimedOut`` error is raised), router retries the request on the next replica as long
228+
as the ``timeout`` value is not elapsed.
229+
230+
.. vshard_request_timeout_note_end
231+
214232
* other :ref:`net.box options <net_box-options>`, such as ``is_async``,
215233
``buffer``, ``on_push`` are also supported.
216234
@@ -283,6 +301,17 @@ Router public API
283301
* ``timeout`` — a request timeout, in seconds. If the ``router`` cannot identify a
284302
shard with the specified ``bucket_id``, it will retry until the timeout is reached.
285303

304+
.. include:: /reference/reference_rock/vshard/vshard_router.rst
305+
:start-after: vshard_request_timeout_note_start
306+
:end-before: vshard_request_timeout_note_end
307+
308+
* ``request_timeout`` (since ``vshard`` 0.1.28) — timeout in seconds that serves as a protection against hung replicas.
309+
It is necessary to pass the ``request_timeout`` and ``timeout`` parameters together, with the following requirement:
310+
``timeout > request_timeout``.
311+
The ``timeout``parameter controls how much time a single request attempt may take.
312+
When this time is over (the ``TimedOut`` error is raised), router retries the request on the next replica as long
313+
as the ``timeout`` value is not elapsed.
314+
286315
* other :ref:`net.box options <net_box-options>`, such as ``is_async``,
287316
``buffer``, ``on_push`` are also supported.
288317

0 commit comments

Comments
 (0)