code: private Transaction createTransaction(long writePointer, TransactionType type) {
      // For holding the first in progress short transaction Id (with timeout >= 0).
      long firstShortTx = Transaction.NO_TX_IN_PROGRESS;
      LongArrayList inProgressIds = new LongArrayList(inProgress.size());
      for (Map.Entry<Long, InProgressTx> entry : inProgress.entrySet()) {
        long txId = entry.getKey();
        inProgressIds.add(txId);
        // add any checkpointed write pointers to the in-progress list
        LongArrayList childIds = entry.getValue().getCheckpointWritePointers();
        if (childIds != null) {
          for (int i = 0; i < childIds.size(); i++) {
            inProgressIds.add(childIds.get(i));
          }
        }
        if (firstShortTx == Transaction.NO_TX_IN_PROGRESS && !entry.getValue().isLongRunning()) {
          firstShortTx = txId;
        }
      }
  
      return new Transaction(readPointer, writePointer, invalidArray, inProgressIds.toLongArray(), firstShortTx, type);
    }
docs: Creates a new Transaction. This method only get called from start transaction, which is already
  synchronized.