|
|
@@ -369,6 +369,13 @@ repeating it cannot change or misreport the result:
|
|
|
| `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 |
|
|
|
|
|
|
+The reason is set wherever the failure is reported: on the thrown error
|
|
|
+(`errorDetail(e)`) for `insert`/`upsert`, and on the `Failure`/`FailureDetail`
|
|
|
+out-parameter for `patch`, `increment`, `updateIfVersion`, `update`, `remove`/
|
|
|
+`removeAs` and `removeManyAs`. `update()` reads before it writes: a timeout on
|
|
|
+that read means the write was never sent, so it is `DeadlineExceeded` WITHOUT
|
|
|
+`outcome_unknown` - the outcome is known, nothing happened.
|
|
|
+
|
|
|
`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.
|
|
|
@@ -679,6 +686,13 @@ fields that every read then hid: invisible, unfilterable (a filter on `_version`
|
|
|
means the metadata), and carried into exports. Exports omit any such copies older
|
|
|
rows still hold.
|
|
|
|
|
|
+**What this means for code that already writes them:** nothing breaks. A body
|
|
|
+that carried these names was stored with them as hidden fields that no read
|
|
|
+returned; now they are simply not stored. Either way every read reports the
|
|
|
+real metadata, and a value written under one of these names was never readable
|
|
|
+back. Decorating a document with `_id` AFTER `insert()` returns (for a response,
|
|
|
+say) never reached the database at all.
|
|
|
+
|
|
|
### Views
|
|
|
|
|
|
Views are named, read-only projections over collections. They filter which fields are returned and optionally enforce baked-in filters and default sort order. Views are ideal for:
|