diff --git a/akka-docs/src/main/paradox/distributed-data.md b/akka-docs/src/main/paradox/distributed-data.md index 56470e58a0..88f53128b9 100644 --- a/akka-docs/src/main/paradox/distributed-data.md +++ b/akka-docs/src/main/paradox/distributed-data.md @@ -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` diff --git a/akka-docs/src/main/paradox/typed/distributed-data.md b/akka-docs/src/main/paradox/typed/distributed-data.md index 8f4e67ccad..d3c197c7ce 100644 --- a/akka-docs/src/main/paradox/typed/distributed-data.md +++ b/akka-docs/src/main/paradox/typed/distributed-data.md @@ -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