update LSN management in second phase task
@@ -64,6 +64,9 @@ public class OTransactionPhase2Task extends OAbstractReplicatedTask {
}
this.success = in.readBoolean();
this.lastLSN = new OLogSequenceNumber(in);
+ if (lastLSN.getSegment() == -1 && lastLSN.getSegment() == -1) {
+ lastLSN = null;
+ }
}
@Override
@@ -75,8 +78,12 @@ public class OTransactionPhase2Task extends OAbstractReplicatedTask {
out.writeInt(involvedCluster);
}
out.writeBoolean(success);
+ if (lastLSN == null) {
+ new OLogSequenceNumber(-1, -1).toStream(out);
+ } else {
lastLSN.toStream(out);
}
+ }
@Override
public Object execute(ODistributedRequestId requestId, OServer iServer, ODistributedServerManager iManager,
