Versions Compared

Key

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

...

This issue aims to also expose information about standby B to R, during each rebalance such that the queries can be routed by an application to a standby to serve stale reads, choosing availability over consistency.

Public Interfaces


Code Block
languagejava
themeConfluence
titleStreamsMetadata.java
public class StreamsMetadata {

private final Set<TopicPartition> standbyTopicPartitions;

public Set<TopicPartition> standbyTopicPartitions() {
    return topicPartitions;
}


Proposed Changes

In the current code, t0 and t1 serve queries from Active(Running) partition. For case t2, we are planning to return List<StreamsMetadata> such that it returns <StreamsMetadata(A), StreamsMetadata(B)> so that if IQ fails on A, the standby on B can serve the data by enabling serving from replicas. This still does not solve case t3 and t4 since B has been promoted to active but it is in Restoring state to catchup till A’s last committed position as we don’t serve from Restoring state in active and new replica on R is building itself from scratch. Both these cases can be solved if we start serving from Restoring state of active as well, since it is almost equivalent to previous active.

...