public void add(TopicIdPartition partition, ShareInFlightBatch<K, V> batch) {
        Objects.requireNonNull(batch);
        ShareInFlightBatch<K, V> currentBatch = this.batches.get(partition);
        if (currentBatch == null) {
            this.batches.put(partition, batch);
        } else {
            // This case shouldn't usually happen because we only send one fetch at a time per partition,
            // but it might conceivably happen in some rare cases (such as partition leader changes).
            currentBatch.merge(batch);
        }
    }
Add another {@link ShareInFlightBatch} to this one; all of its records will be added to this object's
{@link #records() records}.

@param partition the topic-partition
@param batch the batch to add; may not be null
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ShareFetch.java