Open bbengfort opened 7 years ago
Actually as it turns out - a global version number is possible by taking the maximum of all versions for each replica ... see the newly implemented LamportVersion.latest_version
class method.
The issue is that this would reduce the staleness counts, since it is possible for a concurrent fork that hasn't been detected to remain unstale.
In order to implement this, Replicas simply need to call the LamportVersion.update_version
class method on the object they've just received a write from. They can pass in a reference to themselves and the version, and the version numbering will automatically be updated to the maximum value between the remote version and the local counter.
While you're doing this, you should probably also refactor the LamportScalar class and embed that logic into the LamportVersion class, similar to the FederatedVersion class!
In order to completely implement #79 the replica has to reset it's current version state based on the latest seen from incoming versions (in order to guarantee a Lamport Scalar timestamp).
Number #79 is fixed if the settings are changed so that
versioning="lamport"
except for the Replica handling.The reason the replica handling isn't there yet is because globally tracked staleness still requires the global version numbers.