public OptionalLong lastVoterSetOffset() {
        Optional<LogHistory.Entry<VoterSet>> lastEntry = votersHistory.lastEntry();
        if (lastEntry.isPresent()) {
            return OptionalLong.of(lastEntry.get().offset());
        } else {
            return OptionalLong.empty();
        }
    }
Returns the offset of the last voter set stored in the partition history.

Returns {@code OptionalLong.empty} if the last voter set is from the static voters
configuration.

@return the offset storing the last voter set
raft/src/main/java/org/apache/kafka/raft/internals/VoterSetHistory.java