boolean ensureFreshMetadata(Timer timer) {
        if (this.metadata.updateRequested() || this.metadata.timeToNextUpdate(timer.currentTimeMs()) == 0) {
            return awaitMetadataUpdate(timer);
        } else {
            // the metadata is already fresh
            return true;
        }
    }
Ensure our metadata is fresh (if an update is expected, this will block
until it has completed).
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerNetworkClient.java