tephra-core/src/main/java/org/apache/tephra/persist/TransactionEditCodecs.java [133:156]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void decode(TransactionEdit dest, DataInput in) throws IOException {
      dest.setWritePointer(in.readLong());
      int stateIdx = in.readInt();
      try {
        dest.setState(TransactionEdit.State.values()[stateIdx]);
      } catch (ArrayIndexOutOfBoundsException e) {
        throw new IOException("State enum ordinal value is out of range: " + stateIdx);
      }
      dest.setExpiration(in.readLong());
      dest.setCommitPointer(in.readLong());
      dest.setCanCommit(in.readBoolean());
      int changeSize = in.readInt();
      Set<ChangeId> changes = Sets.newHashSet();
      for (int i = 0; i < changeSize; i++) {
        int currentLength = in.readInt();
        byte[] currentBytes = new byte[currentLength];
        in.readFully(currentBytes);
        changes.add(new ChangeId(currentBytes));
      }
      dest.setChanges(changes);
      // 1st version did not store this info. It is safe to set firstInProgress to 0, it may decrease performance until
      // this tx is finished, but correctness will be preserved.
      dest.setVisibilityUpperBound(0);
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



tephra-core/src/main/java/co/cask/tephra/persist/TransactionEditCodecs.java [135:158]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void decode(TransactionEdit dest, DataInput in) throws IOException {
      dest.setWritePointer(in.readLong());
      int stateIdx = in.readInt();
      try {
        dest.setState(TransactionEdit.State.values()[stateIdx]);
      } catch (ArrayIndexOutOfBoundsException e) {
        throw new IOException("State enum ordinal value is out of range: " + stateIdx);
      }
      dest.setExpiration(in.readLong());
      dest.setCommitPointer(in.readLong());
      dest.setCanCommit(in.readBoolean());
      int changeSize = in.readInt();
      Set<ChangeId> changes = Sets.newHashSet();
      for (int i = 0; i < changeSize; i++) {
        int currentLength = in.readInt();
        byte[] currentBytes = new byte[currentLength];
        in.readFully(currentBytes);
        changes.add(new ChangeId(currentBytes));
      }
      dest.setChanges(changes);
      // 1st version did not store this info. It is safe to set firstInProgress to 0, it may decrease performance until
      // this tx is finished, but correctness will be preserved.
      dest.setVisibilityUpperBound(0);
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



