doc: clarify exception from modify function in ddata (#28079)
This commit is contained in:
parent
4b9d5f0302
commit
6d722cc313
2 changed files with 8 additions and 0 deletions
|
|
@ -101,6 +101,10 @@ You will always see your own writes. For example if you send two `Update` messag
|
||||||
changing the value of the same `key`, the `modify` function of the second message will
|
changing the value of the same `key`, the `modify` function of the second message will
|
||||||
see the change that was performed by the first `Update` message.
|
see the change that was performed by the first `Update` message.
|
||||||
|
|
||||||
|
It is possible to abort the `Update` when inspecting the state parameter that is passed in to
|
||||||
|
the `modify` function by throwing an exception. That happens before the update is performed and
|
||||||
|
a `Replicator.ModifyFailure` is sent back as reply.
|
||||||
|
|
||||||
In the `Update` message you can pass an optional request context, which the `Replicator`
|
In the `Update` message you can pass an optional request context, which the `Replicator`
|
||||||
does not care about, but is included in the reply messages. This is a convenient
|
does not care about, but is included in the reply messages. This is a convenient
|
||||||
way to pass contextual information (e.g. original sender) without having to use `ask`
|
way to pass contextual information (e.g. original sender) without having to use `ask`
|
||||||
|
|
|
||||||
|
|
@ -128,6 +128,10 @@ sent back. Note that a `Replicator.UpdateTimeout` reply does not mean that the u
|
||||||
or was rolled back. It may still have been replicated to some nodes, and will eventually
|
or was rolled back. It may still have been replicated to some nodes, and will eventually
|
||||||
be replicated to all nodes with the gossip protocol.
|
be replicated to all nodes with the gossip protocol.
|
||||||
|
|
||||||
|
It is possible to abort the `Update` when inspecting the state parameter that is passed in to
|
||||||
|
the `modify` function by throwing an exception. That happens before the update is performed and
|
||||||
|
a `Replicator.ModifyFailure` is sent back as reply.
|
||||||
|
|
||||||
### Get
|
### Get
|
||||||
|
|
||||||
To retrieve the current value of a data you send `Replicator.Get` message to the
|
To retrieve the current value of a data you send `Replicator.Get` message to the
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue