Fix OLogId.compareTo()
@@ -46,7 +46,11 @@ public class OLogId implements Comparable<OLogId> {
@Override
public int compareTo(OLogId o) {
+ if (this.getTerm() == o.getTerm()) {
return ((Long) this.id).compareTo(o.id);
+ } else {
+ return ((Long) this.getTerm()).compareTo(o.getTerm());
+ }
}
