Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
Description
Right now it is possible to that reading from beginning() to ending() of a local replica will throw an exception because the local replica may have unlearned actions in the log. Creating a local writer first is only a partial solution because there is still a race after the writer has it's underlying coordinator elected but before calling ending() where another writer might (get elected and) append other actions to the log. It seems like a good solution is one where beginning() and ending() actually return special Log::Position objects that can be used to determine how to treat the semantics of Reader::read. It might also make sense to have a Replica::readFrom and Replica::readTo to help deal with this problem.