Fixed variable name in KafkaConsumer
Fixes a misspelled variable name in `KafkaConsumer`: `cachedSubscriptionHashAllFetchPositions` -> `cachedSubscriptionHasAllFetchPositions`.
Reviewers: Kvicii Jason Gustafson
@@ -596,7 +596,7 @@ public class KafkaConsumer<K, V> implements Consumer<K, V> {
private final AtomicInteger refcount = new AtomicInteger(0);
// to keep from repeatedly scanning subscriptions in poll(), cache the result during metadata updates
- private boolean cachedSubscriptionHashAllFetchPositions;
+ private boolean cachedSubscriptionHasAllFetchPositions;
/**
* A consumer is instantiated by providing a set of key-value pairs as configuration. Valid configuration strings
@@ -1294,9 +1294,9 @@ public class KafkaConsumer<K, V> implements Consumer<K, V> {
// We do not want to be stuck blocking in poll if we are missing some positions
// since the offset lookup may be backing off after a failure
- // NOTE: the use of cachedSubscriptionHashAllFetchPositions means we MUST call
+ // NOTE: the use of cachedSubscriptionHasAllFetchPositions means we MUST call
// updateAssignmentMetadataIfNeeded before this method.
- if (!cachedSubscriptionHashAllFetchPositions && pollTimeout > retryBackoffMs) {
+ if (!cachedSubscriptionHasAllFetchPositions && pollTimeout > retryBackoffMs) {
pollTimeout = retryBackoffMs;
}
@@ -2444,8 +2444,8 @@ public class KafkaConsumer<K, V> implements Consumer<K, V> {
// If any partitions have been truncated due to a leader change, we need to validate the offsets
fetcher.validateOffsetsIfNeeded();
- cachedSubscriptionHashAllFetchPositions = subscriptions.hasAllFetchPositions();
- if (cachedSubscriptionHashAllFetchPositions) return true;
+ cachedSubscriptionHasAllFetchPositions = subscriptions.hasAllFetchPositions();
+ if (cachedSubscriptionHasAllFetchPositions) return true;
// If there are any partitions which do not have a valid position and are not
// awaiting reset, then we need to fetch committed offsets. We will only do a
