doc: clarify exception from modify function in ddata (#28079)

This commit is contained in:
Patrik Nordwall 2019-10-28 15:15:15 +01:00 committed by Johannes Rudolph
parent 4b9d5f0302
commit 6d722cc313
2 changed files with 8 additions and 0 deletions

View file

@ -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
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`
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`

View file

@ -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
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
To retrieve the current value of a data you send `Replicator.Get` message to the