Skip to content

Commit

Permalink
Clarifying arbitrary choice to return BEFORE for equal vector clocks.
Browse files Browse the repository at this point in the history
  • Loading branch information
vinothchandar committed Apr 11, 2013
1 parent 560bd67 commit 74bdfde
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/java/voldemort/versioning/VectorClock.java
Expand Up @@ -325,7 +325,11 @@ else if(ver2.getVersion() > ver1.getVersion())
else if(p2 < v2.versions.size())
v2Bigger = true;

/* This is the case where they are equal, return BEFORE arbitrarily */
/*
* This is the case where they are equal. Consciously return BEFORE, so
* that the we would throw back an ObsoleteVersionException for online
* writes with the same clock.
*/
if(!v1Bigger && !v2Bigger)
return Occurred.BEFORE;
/* This is the case where v1 is a successor clock to v2 */
Expand Down

0 comments on commit 74bdfde

Please sign in to comment.