|
@@ -367,7 +367,8 @@ repeating it cannot change or misreport the result:
|
|
|
| Write | Retried after `DeadlineExceeded`? |
|
|
| Write | Retried after `DeadlineExceeded`? |
|
|
|
|-------|-----------------------------------|
|
|
|-------|-----------------------------------|
|
|
|
| `patch` (no increments, no expected version), `upsert` with an id | yes - idempotent |
|
|
| `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
|
|
The reason is set wherever the failure is reported: on the thrown error
|
|
|
(`errorDetail(e)`) for `insert`/`upsert`, and on the `Failure`/`FailureDetail`
|
|
(`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
|
|
that read means the write was never sent, so it is `DeadlineExceeded` WITHOUT
|
|
|
`outcome_unknown` - the outcome is known, nothing happened.
|
|
`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.
|
|
`Unavailable` and `ResourceExhausted` are still retried: the server did not act.
|
|
|
**Do not map `DeadlineExceeded` on a write to "retry as-is".** With
|
|
**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.
|
|
`outcome_unknown`, read the row first (or write under a fixed id) and decide.
|