KAFKA-9731: Disable immediate fetch response for hw propagation if replica selector is not defined - #8607
Conversation
gwenshap
left a comment
There was a problem hiding this comment.
LGTM (after fixing the missing import).
I liked the cleanup to findPreferredReadReplica.
ed93f35 to
ae19a90
Compare
|
1 job passed, 1 failed due to a spotBugs issue with Scala 2.12 and one failed with an unrelated flaky test failure:
I pushed a fix for the spotBugs issue and will try to add a test verifying this behavior since we don't see to have any. |
|
retest this please |
|
@ijuma Thanks for the patch. I think the change makes sense. Part of me is inclined to drop the logic for the immediate propagation of the high watermark entirely. Instead, we could say propagation is bounded by the max wait time which users could potentially tune for their own needs. Otherwise enabling this feature becomes sort of risky. We just need to be a little careful to ensure that the partition still gets included in the fetch response if there is a high watermark update. I'll open a JIRA and we can discuss this separately. |
|
@hachikuji I was thinking the exact same thing. :) I thought this PR could be the simple one we can backport and then we can discuss the larger change separately as you suggested. |
935b27b to
34d70ce
Compare
|
Filed this issue: https://issues.apache.org/jira/browse/KAFKA-9952. |
|
retest this please |
|
1 job passed, the other 2 had unrelated flaky failures:
|
|
The new test looks good and validates the change made in this PR. LGTM. |
* 'trunk' of github.com:apache/kafka: (87 commits) KAFKA-9865: Expose output topic names from TopologyTestDriver (apache#8483) MINOR - Increase the number of Trogdor Histogram buckets to 10000 (apache#8627) KAFKA-9768: Fix handling of rest.advertised.listener config (apache#8360) KAFKA-9419: Fix possible integer overflow in CircularIterator (apache#7950) MINOR: Only add 'Data' suffix for generated request/response/header types (apache#8625) KAFKA-9947; Ensure proper shutdown of services in `TransactionsBounceTest` (apache#8602) KAFKA-6342; Remove unused workaround for JSON parsing of non-escaped strings (apache#8591) MINOR: Pass `-release 8` to scalac and upgrade to Gradle 6.4 (apache#8538) KAFKA-9946; Partition deletion event should only be sent if deletion was requested in the StopReplica request (apache#8609) MINOR: Improve TopologyTestDriver JavaDocs (apache#8619) MINOR: MockAdminClient should return InvalidReplicationFactorException if brokers.size < replicationFactor KAFKA-9748: Add Streams eos-beta integration test (apache#8496) KAFKA-9731: Disable immediate fetch response for hw propagation if replica selector is not defined (apache#8607) HOTFIX: set correct numIterations in shouldAllowConcurrentAccesses MINOR: Clean up some test dependencies on ConfigCommand and TopicCommand (apache#8527) KAFKA-9918; SslEngineFactory is NOT closed when channel is closing (apache#8551) KAFKA-9798: Send one round synchronously before starting the async producer (apache#8565) MINOR: Annotate KafkaAdminClientTest.testAlterClientQuotas() with @test KAFKA-9589: Enable testLogAppendTimeNonCompressedV2 and fix bug in helper method (apache#8533) MINOR: Use min/max function when possible (apache#8577) ... # Conflicts: # core/src/main/scala/kafka/log/Log.scala # gradle/dependencies.gradle # gradle/wrapper/gradle-wrapper.properties # gradlew
…plica selector is not defined (apache#8607) In the case described in the JIRA, there was a 50%+ increase in the total fetch request rate in 2.4.0 due to this change. I included a few additional clean-ups: * Simplify `findPreferredReadReplica` and avoid unnecessary collection copies. * Use `LongSupplier` instead of `Supplier<Long>` in `SubscriptionState` to avoid unnecessary boxing. Added a unit test to ReplicaManagerTest and cleaned up the test class a bit including consistent usage of Time in MockTimer and other components. Reviewers: Gwen Shapira <gwen@confluent.io>, David Arthur <mumrah@gmail.com>, Jason Gustafson <jason@confluent.io>
|
hello @ijuma, I was wondering if you knew when this fix would be backported. We are currently on 2.5.0 and we are currently experiencing this issue. Thank you |
|
@jlisam It's too late to be included in 2.5.1 (currently in RC stage), but it will be part of 2.6.0 (also at RC stage). Would you be able to upgrade to 2.6.0? |
|
@ijuma thanks for the prompt response. I think we should be able to upgrade to 2.6.0 but ideally a backport would be better given that we have spent some time validating the 2.5.0 cluster performance. Anyhow, thanks for fixing this 😄 ! |
…plica selector is not defined (apache#8607) In the case described in the JIRA, there was a 50%+ increase in the total fetch request rate in 2.4.0 due to this change. I included a few additional clean-ups: * Simplify `findPreferredReadReplica` and avoid unnecessary collection copies. * Use `LongSupplier` instead of `Supplier<Long>` in `SubscriptionState` to avoid unnecessary boxing. Added a unit test to ReplicaManagerTest and cleaned up the test class a bit including consistent usage of Time in MockTimer and other components. Reviewers: Gwen Shapira <gwen@confluent.io>, David Arthur <mumrah@gmail.com>, Jason Gustafson <jason@confluent.io>
In the case described in the JIRA, there was a 50%+ increase in the total fetch request rate in
2.4.0 due to this change.
I included a few additional clean-ups:
findPreferredReadReplicaand avoid unnecessary collection copies.LongSupplierinstead ofSupplier<Long>inSubscriptionStateto avoid unnecessary boxing.Added a unit test to ReplicaManagerTest and cleaned up the test class a bit including
consistent usage of Time in MockTimer and other components.
Committer Checklist (excluded from commit message)