private boolean maybeValidatePosition(Metadata.LeaderAndEpoch currentLeaderAndEpoch) {
            if (this.fetchState.equals(FetchStates.AWAIT_RESET)) {
                return false;
            }

            if (!currentLeaderAndEpoch.leader.isPresent()) {
                return false;
            }

            if (position != null && !position.currentLeader.equals(currentLeaderAndEpoch)) {
                FetchPosition newPosition = new FetchPosition(position.offset, position.offsetEpoch, currentLeaderAndEpoch);
                validatePosition(newPosition);
                preferredReadReplica = null;
            }
            return this.fetchState.equals(FetchStates.AWAIT_VALIDATION);
        }
Check if the position exists and needs to be validated. If so, enter the AWAIT_VALIDATION state. This method
also will update the position with the current leader and epoch.

@param currentLeaderAndEpoch leader and epoch to compare the offset with
@return true if the position is now awaiting validation
clients/src/main/java/org/apache/kafka/clients/consumer/internals/SubscriptionState.java