Code review comment: Since the table has been dropped, and all transactionStates involve the same table, can we finish all these thansactions short-circuit instead of converting to single publish to deal with the situation？

Code under review:
public List<TransactionStateBatch> getReadyToPublishTxnListBatch() {
        List<TransactionStateBatch> result = new ArrayList<>();
        readLock();

        try {
            List<Long> txnIds = transactionGraph.getTxnsWithoutDependency();
            for (long txnId : txnIds) {
                List<Long> txnsWithDependency = transactionGraph.getTxnsWithTxnDependencyBatch(
                        Config.lake_batch_publish_min_version_num,
                        Config.lake_batch_publish_max_version_num, txnId);
                List<TransactionState> states = txnsWithDependency.stream().map(id -> idToRunningTransactionState.get(id))
                        .filter(Objects::nonNull)
                        .collect(Collectors.toList());
                if (states.isEmpty()) {
                    continue;
                }
                if (states.size() == 1) { 
                    result.add(new TransactionStateBatch(states));
                    continue;
                }

                
                Preconditions.checkState(states.get(0).getTableIdList().size() == 1);

                long tableId = states.get(0).getTableIdList().get(0);

                
                
                Map<Long, PartitionCommitInfo> versions = new HashMap<>();

                outerLoop:
                for (int i = 0; i < states.size(); i++) {
                    TransactionState state = states.get(i);
                    TableCommitInfo tableInfo = state.getTableCommitInfo(tableId);
                    
                    if (tableInfo == null) {
                        states = states.subList(0, Math.max(i, 1));
                        break;
                    }
                    Map<Long, PartitionCommitInfo> partitionInfoMap = tableInfo.getIdToPartitionCommitInfo();
                    for (Map.Entry<Long, PartitionCommitInfo> item : partitionInfoMap.entrySet()) {
                        PartitionCommitInfo currTxnInfo = item.getValue();
                        PartitionCommitInfo prevTxnInfo = versions.get(item.getKey());
                        if (prevTxnInfo != null && prevTxnInfo.getVersion() + 1 != currTxnInfo.getVersion()) {
                            assert i > 0;
                            
                            
                            states = states.subList(0, i);
                            break outerLoop;
                        }
                        versions.put(item.getKey(), currTxnInfo);
                    }
                }

                TransactionStateBatch batch = new TransactionStateBatch(states);
                result.add(batch);
            }
        } finally {
            readUnlock();
        }
        return result;
    }

Line commented on: if (tableInfo == null) {

Revised code:
public List<TransactionStateBatch> getReadyToPublishTxnListBatch() {
        List<TransactionStateBatch> result = new ArrayList<>();
        readLock();

        try {
            List<Long> txnIds = transactionGraph.getTxnsWithoutDependency();
            for (long txnId : txnIds) {
                List<Long> txnsWithDependency = transactionGraph.getTxnsWithTxnDependencyBatch(
                        Config.lake_batch_publish_min_version_num,
                        Config.lake_batch_publish_max_version_num, txnId);
                List<TransactionState> states = txnsWithDependency.stream().map(id -> idToRunningTransactionState.get(id))
                        .filter(Objects::nonNull)
                        .collect(Collectors.toList());
                if (states.isEmpty()) {
                    continue;
                }
                if (states.size() == 1) { 
                    result.add(new TransactionStateBatch(states));
                    continue;
                }

                
                Preconditions.checkState(states.get(0).getTableIdList().size() == 1);

                long tableId = states.get(0).getTableIdList().get(0);

                
                
                Map<Long, PartitionCommitInfo> versions = new HashMap<>();

                outerLoop:
                for (int i = 0; i < states.size(); i++) {
                    TransactionState state = states.get(i);
                    TableCommitInfo tableInfo = state.getTableCommitInfo(tableId);
                    
                    if (tableInfo == null) {
                        states = states.subList(0, Math.max(i, 1));
                        break;
                    }
                    Map<Long, PartitionCommitInfo> partitionInfoMap = tableInfo.getIdToPartitionCommitInfo();
                    for (Map.Entry<Long, PartitionCommitInfo> item : partitionInfoMap.entrySet()) {
                        PartitionCommitInfo currTxnInfo = item.getValue();
                        PartitionCommitInfo prevTxnInfo = versions.get(item.getKey());
                        if (prevTxnInfo != null && prevTxnInfo.getVersion() + 1 != currTxnInfo.getVersion()) {
                            assert i > 0;
                            
                            
                            states = states.subList(0, i);
                            break outerLoop;
                        }
                        versions.put(item.getKey(), currTxnInfo);
                    }
                }

                TransactionStateBatch batch = new TransactionStateBatch(states);
                result.add(batch);
            }
        } finally {
            readUnlock();
        }
        return result;
    }