The Java client could use a mode called "read your writes" consistency where we ensure that we read whatever the leader has committed at the time of the request.
At the time of writing, the implementation requirements look like the following:
- Always scan from the leader
- Specify that the leader must apply all operations from previous leaders before processing the query
In the C++ client, this can be achieved by specifying both of the LEADER_ONLY and READ_AT_SNAPSHOT options, while not specifying a timestamp to use for the snapshot when starting the scan.
In the Java client API, we may want to simply expose a scan option called "read your writes" or something similar.