Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Status

Current state: Under Discussion

...

Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).

Motivation

The WindowBytesStore interface provides a method to get the number of segments in the store so that the WindowStoreBuilder can use the information to wrap the store in a cache. The problem is that the cache needs to know the segment size, not the segment count.

This KIP proposes to replace the current method with one providing the correct information.

Proposed Public Interface Change

In WindowBytesStoreSupplier, we will:

...

No Format
/**
 * The number of segments the store has. If your store is segmented then this should be the number of segments
 * in the underlying store.
 * It is also used to reduce the amount of data that is scanned when caching is enabled.
 *
 * @return number of segments
 * @deprecated since 2.1. Use {@link WindowBytesStoreSupplier#segmentSize()} instead.
 */
@Deprecated
int segments();

/**
 * The size of the segments (in milliseconds) the store has.
 * If your store is segmented then this should be the size of segments in the underlying store.
 * It is also used to reduce the amount of data that is scanned when caching is enabled.
 *
 * @return size of the segments (in milliseconds)
 */
long segmentSize();


Compatibility, Deprecation, and Migration Plan

The change in this KIP is backward compatible as it only deprecates the existing method.

Rejected Alternatives

None.