@Override
    public synchronized KeyValueIterator<Bytes, byte[]> range(final Bytes from, final Bytes to) {
        // from bound is inclusive. if the provided bound is null, replace with prefix
        final Bytes fromBound = from == null
            ? prefixKeyFormatter.getPrefix()
            : prefixKeyFormatter.addPrefix(from);
        // to bound is inclusive. if the provided bound is null, replace with the next prefix.
        // this requires potentially filtering out the element corresponding to the next prefix
        // with empty bytes from the returned iterator. this filtering is accomplished by
        // passing the prefix filter into StrippedPrefixKeyValueIteratorAdapter().
        final Bytes toBound = to == null
            ? incrementWithoutOverflow(prefixKeyFormatter.getPrefix())
            : prefixKeyFormatter.addPrefix(to);
        final KeyValueIterator<Bytes, byte[]> iteratorWithKeyPrefixes = physicalStore.range(
            fromBound,
            toBound,
            openIterators);
        return new StrippedPrefixKeyValueIteratorAdapter(
            iteratorWithKeyPrefixes,
            prefixKeyFormatter::removePrefix,
            prefixKeyFormatter::startsWithPrefix);
    }
This "logical segment" is a segment which shares its underlying physical store with other
logical segments. Each segment uses a unique, fixed-length key prefix derived from the
segment ID when writing to the shared physical store. In other words, a logical segment
stores a key into a shared physical store by prepending the key with a prefix (unique to
the specific logical segment), and storing the combined key into the physical store.
streams/src/main/java/org/apache/kafka/streams/state/internals/LogicalKeyValueSegment.java