Răsfoiți Sursa

docs: 2.13.1 - update()'s read timeout in the retry table; audit every write for the reason

Both suggested by smartbotic while building against 2.13.1: the table row
read as though every update() timeout were unknown-outcome, and adopting
outcome_unknown requires every write on the Failure/FailureDetail overloads,
not only the calls that already used them.
fszontagh 1 lună în urmă
părinte
comite
a62a38d86e
1 a modificat fișierele cu 8 adăugiri și 1 ștergeri
  1. 8 1
      docs/integration-guide.md

+ 8 - 1
docs/integration-guide.md

@@ -367,7 +367,8 @@ repeating it cannot change or misreport the result:
 | Write | Retried after `DeadlineExceeded`? |
 |-------|-----------------------------------|
 | `patch` (no increments, no expected version), `upsert` with an id | yes - idempotent |
-| `insert`, `upsert` without an id, `increment`, `patchIfVersion`, `updateIfVersion`, `update`'s inner write, `remove`/`removeAs`/`removeManyAs` | no - a repeat would duplicate a row, count twice, or report a false AlreadyExists / version conflict / not-found |
+| `insert`, `upsert` without an id, `increment`, `patchIfVersion`, `updateIfVersion`, `remove`/`removeAs`/`removeManyAs` | no - a repeat would duplicate a row, count twice, or report a false AlreadyExists / version conflict / not-found |
+| `update()` | its inner write is not retried (`outcome_unknown`); a timeout on its READ, before the write is sent, has NO `outcome_unknown` and is safe to repeat |
 
 The reason is set wherever the failure is reported: on the thrown error
 (`errorDetail(e)`) for `insert`/`upsert`, and on the `Failure`/`FailureDetail`
@@ -376,6 +377,12 @@ out-parameter for `patch`, `increment`, `updateIfVersion`, `update`, `remove`/
 that read means the write was never sent, so it is `DeadlineExceeded` WITHOUT
 `outcome_unknown` - the outcome is known, nothing happened.
 
+**Adopting the reason means auditing EVERY write call.** The out-parameter
+overloads have existed since 2.11.4/2.12.0, and a consumer that adopted them for
+the calls with obvious structured fields (`remove`'s relation, `increment`) but
+left `update`/`patch`/`patchWithTtl` on the bare `bool`/version forms sees no
+`outcome_unknown` from its most common writes - that is how smartbotic found it.
+
 `Unavailable` and `ResourceExhausted` are still retried: the server did not act.
 **Do not map `DeadlineExceeded` on a write to "retry as-is".** With
 `outcome_unknown`, read the row first (or write under a fixed id) and decide.