private boolean maybeDrain(final Set<TopicPartition> partitions, final CompletedFetch completedFetch) {
        if (completedFetch != null && !partitions.contains(completedFetch.partition)) {
            log.debug("Removing {} from buffered fetch data as it is not in the set of partitions to retain ({})", completedFetch.partition, partitions);
            completedFetch.drain();
            return true;
        } else {
            return false;
        }
    }
Drains (i.e. <em>removes</em>) the contents of the given {@link CompletedFetch} as its data should not
be returned to the user.
clients/src/main/java/org/apache/kafka/clients/consumer/internals/FetchBuffer.java