I thought that the following pattern would be preferable in an async world.
fn update(x_transid: i64, key:i32, value:i32) → bool {
// x_transid is expcted to be unique. Only one call to x_transid will succeed in external call ; if at all…every other call will fail
// therefore reducers will ALWAYS return true
}
fn lookup(x_transid: i64, key: i32) → bool {
// did update suceed in external call with key being updated with attached x_transid
}
So you make the call to update; but rely on lookup to know whether the update actually suceeded. Of course support is required from the external system.