/**
   * In this test, we often want to check that the last item in the replicated stream is not a
   * matchpoint candidate (that VLSNRange.lastVLSN != VLSNRange.lastSync) There's nothing wrong
   * intrinsically with that being so, it's just that this test is trying to ensure that we test
   * partial rollbacks.
   *
   * @return lastVLSN
   * @throws InterruptedException
   */
  private VLSN ensureDistinctLastAndSyncVLSN(ReplicatedEnvironment master, RepEnvInfo[] repEnvInfo)
      throws InterruptedException {

    VLSNIndex vlsnIndex = RepInternal.getRepImpl(master).getVLSNIndex();
    VLSNRange range = vlsnIndex.getRange();
    VLSN lastVLSN = range.getLast();
    VLSN syncVLSN = range.getLastSync();
    assertFalse("lastVLSN = " + lastVLSN + " syncVLSN = " + syncVLSN, lastVLSN.equals(syncVLSN));

    return lastVLSN;
  }
Exemplo n.º 2
0
  /** @see Loggable#logicalEquals */
  public boolean logicalEquals(Loggable other) {

    if (!(other instanceof RollbackStart)) {
      return false;
    }

    RollbackStart otherRS = (RollbackStart) other;

    return (matchpointVLSN.equals(otherRS.matchpointVLSN)
        && (matchpointLSN == otherRS.matchpointLSN)
        && time.equals(otherRS.time)
        && activeTxnIds.equals(otherRS.activeTxnIds));
  }