This is an automated email from the ASF dual-hosted git repository.
jgus pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push:
new 368f4ce KAFKA-13323; Fixed variable name in KafkaConsumer (#11558)
368f4ce is described below
commit 368f4cee7afb269fab092cb58f6411f27a1dece4
Author: Vijay Krishna <[email protected]>
AuthorDate: Fri Feb 11 03:43:43 2022 +0530
KAFKA-13323; Fixed variable name in KafkaConsumer (#11558)
Fixes a misspelled variable name in `KafkaConsumer`:
`cachedSubscriptionHashAllFetchPositions` ->
`cachedSubscriptionHasAllFetchPositions`.
Reviewers: Kvicii <[email protected]>, Jason Gustafson
<[email protected]>
---
.../java/org/apache/kafka/clients/consumer/KafkaConsumer.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git
a/clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java
b/clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java
index e537ff0..0fd4ea9 100644
--- a/clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java
+++ b/clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java
@@ -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