private static boolean allInvalidFrom(long[] invalidIds, int start, long hwm) {
    for (int i=start+1;i<invalidIds.length;i++) {
      if (invalidIds[i] != (invalidIds[i-1]+1)) {
        return false;
      }
    }
    return invalidIds[invalidIds.length-1] == hwm;
  }
Compare the freshness of two ValidWriteIdList
@param a
@param b
@return 0, if a and b are equivalent
1, if a is more recent
-1, if b is more recent
*
storage-api/src/java/org/apache/hive/common/util/TxnIdUtils.java