protected void safeForceUnmap() {
        if (mmap != null) {
            try {
                forceUnmap();
            } catch (Throwable t) {
                log.error("Error unmapping index {}", file, t);
            }
        }
    }
Check if a particular offset is valid to be appended to this index.
@param offset The offset to check
@return true if this offset is valid to be appended to this index; false otherwise
storage/src/main/java/org/apache/kafka/storage/internals/log/AbstractIndex.java