code: void endStateTransfer() throws IOException {
      File nextDir = getNextDataDir();
      FileUtils.atomicMove(this.dataDir, nextDir);
      // Update current data directory.
      this.dataDir = nextDir;
      // Restores transaction log.
      this.log = createLog(dataDir);
      fsyncDirectory();
      this.isTransferring = false;
    }
docs: Ends state transferring mode, after calling this function, all the txns
  and snapshots persisted during the transferring mode will be visible from
  now.