KAFKA-9329. KafkaController::replicasAreValid should return error#7865
KAFKA-9329. KafkaController::replicasAreValid should return error#7865hachikuji merged 6 commits intoapache:trunkfrom
Conversation
|
retest this please |
|
retest this please |
|
retest this please |
3 similar comments
|
retest this please |
|
retest this please |
|
retest this please |
|
2.13 build failed with OOM: 2.12 has two unit test failure: They pass locally. I will trigger tests again to see if 2.13 can make progress |
|
retest this please |
There was a problem hiding this comment.
Seems like a basic reassignment test case. Do you think it is not covered in ReassignPartitionsClusterTest? It's not too clear to me why we have two separate test cases.
There was a problem hiding this comment.
It is covered. That code uses zkClient and ReassignPartitionsCommand. This test code uses AdminClient directly. Both of them test same backend code, so maybe its ok to get rid of this as when ReassignPartitionsCommand is fixed as part of KIP-500 we will have duplicate test.
Let me know what you prefer and I will take this test out.
594a0ea to
aec877a
Compare
|
retest this please |
|
2.13 build had issues when running
2.12 build had one test failure: |
aec877a to
dbf2f25
Compare
|
retest this please |
|
ok to test |
There was a problem hiding this comment.
I think we can remove this and just say there were duplicates in the replica list. Then we can remove the spotbugs warning.
|
Just a minor comment. Otherwise, looks good. |
The `KafkaController::replicasAreValid` method currently returns a boolean indicating if replicas are valid or not. But the failure condition loses any context on why replicas are not valid. This change updates the metod to return the error conition if validation fails. This allows caller to report the error to the client. The change also renames the `replicasAreValid` method to `validateReplicas` to reflect updated semantics.
The change fixes the error when using map on `scala.collections.Seq` as 2.13 has following change: > In Scala 2.13 scala.Seq[+A] is an alias for > scala.collection.immutable.Seq[A], instead of scala.collection.Seq[A] Fixed code to specify correct collection type as implicit infrence was creating incorrect collection and failing compilation. The build still fails with coverage tool failing on deprecation warnings.
Couple of tests were duplicating code to create list of bootstrap servers. There is already a method in TestUtils to do the same, updated the tests to use that (TestUtils.bootstrapServers)
…assignments One failure case wasn't handled correctly in KafkaController::validateReplicas method. Updated code to check the boolean return condition and generate proper error message.
dbf2f25 to
bcd8a6f
Compare
|
ok to test |
|
retest this please |
1 similar comment
|
retest this please |
|
ok to test |
|
retest this please |
Conflicts or compilation errors due to the fact that we temporarily reverted the commit that removes Scala 2.11 support: * AclCommand.scala: take upstream changes. * AclCommandTest.scala: take upstream changes. * TransactionCoordinatorTest.scala: don't use SAMs, but adjust mock call to putTransactionStateIfNotExists given new signature. * TransactionStateManagerTest: use Runnable instead of SAMs. * PartitionLockTest: use Runnable instead of SAMs. * docs/upgrade.html: take upstream changes excluding line that states that Scala 2.11 support has been removed. * apache-github/trunk: (28 commits) KAFKA-9457; Fix flaky test org.apache.kafka.common.network.SelectorTest.testGracefulClose (apache#7989) MINOR: Update AclCommand help message to match implementation (apache#7990) MINOR: Update introduction page in Kafka documentation MINOR: Use Math.min for StreamsPartitionAssignor#updateMinReceivedVersion method (apache#7954) KAFKA-9338; Fetch session should cache request leader epoch (apache#7970) KAFKA-9329; KafkaController::replicasAreValid should return error message (apache#7865) KAFKA-9449; Adds support for closing the producer's BufferPool. (apache#7967) MINOR: Handle expandIsr in PartitionLockTest and ensure read threads not blocked on write (apache#7973) MINOR: Fix typo in connect integration test class name (apache#7976) KAFKA-9218: MirrorMaker 2 can fail to create topics (apache#7745) KAFKA-8847; Deprecate and remove usage of supporting classes in kafka.security.auth (apache#7966) MINOR: Suppress DescribeConfigs Denied log during CreateTopics (apache#7971) [MINOR]: Fix typo in Fetcher comment (apache#7934) MINOR: Remove unnecessary call to `super` in `MetricConfig` constructor (apache#7975) MINOR: fix flaky StreamsUpgradeTestIntegrationTest (apache#7974) KAFKA-9431: Expose API in KafkaStreams to fetch all local offset lags (apache#7961) KAFKA-9235; Ensure transaction coordinator is stopped after replica deletion (apache#7963) KAFKA-9410; Make groupId Optional in KafkaConsumer (apache#7943) MINOR: Removed accidental double negation in error message. (apache#7834) KAFKA-6144: IQ option to query standbys (apache#7962) ...
The
KafkaController::replicasAreValidmethod currently returns aboolean indicating if replicas are valid or not. But the failure
condition loses any context on why replicas are not valid. This change
updates the metod to return the error conition if validation fails. This
allows caller to report the error to the client.
The change also renames the
replicasAreValidmethod tovalidateReplicasto reflect updated semantics.More detailed description of your change,
if necessary. The PR title and PR message become
the squashed commit message, so use a separate
comment to ping reviewers.
Summary of testing strategy (including rationale)
for the feature or bug fix. Unit and/or integration
tests are expected for any behaviour change and
system tests should be considered for larger changes.
Committer Checklist (excluded from commit message)