code: synchronized long rollEditLog() throws IOException {
      LOG.info("Rolling edit logs.");
      long start = System.nanoTime();
      
      endCurrentLogSegment(true);
      long nextTxId = getLastWrittenTxId() + 1;
      startLogSegment(nextTxId, true);
  
      assert curSegmentTxId == nextTxId;
      long rollTime = DFSUtil.getElapsedTimeMicroSeconds(start);
      if (metrics != null) {
        metrics.rollEditLogTime.inc(rollTime);
        metrics.tsLastEditsRoll.set(System.currentTimeMillis());
      }
      return nextTxId;
    }
docs: Finalizes the current edit log and opens a new log segment.
  @return the transaction id of the BEGIN_LOG_SEGMENT transaction
  in the new log.