boolean isPartitionChanged(StickyPartitionInfo partitionInfo) {
        // partitionInfo may be null if the caller didn't use built-in partitioner.
        return partitionInfo != null && stickyPartitionInfo.get() != partitionInfo;
    }
Check if partition is changed by a concurrent thread.  NOTE this function needs to be called under
the partition's batch queue lock.

@param partitionInfo The sticky partition info object returned by peekCurrentPartitionInfo
@return true if sticky partition object is changed (race condition)
clients/src/main/java/org/apache/kafka/clients/producer/internals/BuiltInPartitioner.java