static void requestMetadataUpdate(final ConsumerMetadata metadata,
                                      final SubscriptionState subscriptions,
                                      final TopicPartition topicPartition) {
        metadata.requestUpdate(false);
        subscriptions.clearPreferredReadReplica(topicPartition);
    }
Performs two combined actions based on the state related to the {@link TopicPartition}:

<ol>
    <li>
        Invokes {@link ConsumerMetadata#requestUpdate(boolean)} to signal that the metadata is incorrect and
        needs to be updated
    </li>
    <li>
        Invokes {@link SubscriptionState#clearPreferredReadReplica(TopicPartition)} to clear out any read replica
        information that may be present.
    </li>
</ol>

This utility method should be invoked if the client detects (or is told by a node in the broker) that an
attempt was made to fetch from a node that isn't the leader or preferred replica.

@param metadata {@link ConsumerMetadata} for which to request an update
@param subscriptions {@link SubscriptionState} to clear any internal read replica node
@param topicPartition {@link TopicPartition} for which this state change is related
clients/src/main/java/org/apache/kafka/clients/consumer/internals/FetchUtils.java