Versions Compared

Key

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

...

  • AssignmentInfo changes to include Map<HostInfo, Set<TopicPartition>> standbyPartitionsByHost;  so that each machine knows which machine holds which standby partitions along with the active partitions(which they currently do). Consequently AssignmentInfo version will be bumped up to VERSION 6

  • Changing signature of setPartitionsByHostState(partitionsByHostState, standbyPartitionsByHost) and to onChange() and further rebuildMetadata() to add Set<TopicPartition> standbyTopicPartitions in StreamsMetadata. This will add standby partitions in the metadata.

  • Addition of StreamsMetadataState::getStandbyMetadataListForKey() to returns a list of StreamsMetadata which contains all the standbys available in the system for the partition. We would have access to allMetadata containing activePartitions as well as standby partitions in the StreamsMetadataState.java with the above changes.

  • Renaming partitionsForHost to activePartitionsForHost in StreamsMetadataState.java and partitionsByHostState to activePartitionsByHostState in StreamsPartitionAssignor.java
  • We will introduce a new config in Streams, to control how often the lag information is refreshed by reading the tail record of the change-log topic partition 
Code Block
public static final String LAG_REFRESH_MS_CONFIG = "lag.refresh.ms"; // default : 3 seconds
private static final String LAG_REFRESH_DOC = "The amount of time in milliseconds to wait before fetching latest lag for a state store against its change-log";


With this KIP, the onus is left on a user of how much lag they are okay to serve queries with. Since, after this KIP there is the capability of serving from a restoring active as well as running standby task and each response returns the lag along with the actual value, so a user can either decide to discard it or return it back to the client. 

Open items : Navinder Pal Singh Brar FYI 

...

Compatibility, Deprecation, and Migration Plan

...