Skip to content

KAFKA-9868: Reduce transaction log partitions for embed broker#8522

Merged
mjsax merged 1 commit intoapache:trunkfrom
abbccdda:fix_embedded_broker
Apr 21, 2020
Merged

KAFKA-9868: Reduce transaction log partitions for embed broker#8522
mjsax merged 1 commit intoapache:trunkfrom
abbccdda:fix_embedded_broker

Conversation

@abbccdda
Copy link
Copy Markdown

@abbccdda abbccdda commented Apr 20, 2020

This PR tries to fix the flaky EOSUncleanShutdownIntegrationTest.shouldWorkWithUncleanShutdownWipeOutStateStore by making the bootstrapping of the test to be less painful with fewer number of partitions of txn log.

The integration test time on local also reduced one second.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

putIfAbsent(brokerConfig, KafkaConfig$.MODULE$.GroupInitialRebalanceDelayMsProp(), 0);
putIfAbsent(brokerConfig, KafkaConfig$.MODULE$.OffsetsTopicReplicationFactorProp(), (short) 1);
putIfAbsent(brokerConfig, KafkaConfig$.MODULE$.OffsetsTopicPartitionsProp(), 5);
putIfAbsent(brokerConfig, KafkaConfig$.MODULE$.TransactionsTopicPartitionsProp(), 5);
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the actual fix, other parts are just side cleanups.

@abbccdda
Copy link
Copy Markdown
Author

@vvcephei @mjsax Call for a review

@mjsax
Copy link
Copy Markdown
Member

mjsax commented Apr 20, 2020

Retest this please.

@mjsax mjsax added streams tests Test fixes (including flaky tests) labels Apr 20, 2020
Copy link
Copy Markdown
Member

@mjsax mjsax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Let's see if this helps. If yes, we might want to do a similar thing for all EOS integration tests?

* Creates and starts a Kafka cluster.
*/
public void start() throws IOException, InterruptedException {
public void start() throws IOException {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we would have written throws Exception from the beginning on, this change would not be necessary... (Just to back up my preferred coding stile to only use throws Exception in tests.)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lol, makes sense.

@abbccdda
Copy link
Copy Markdown
Author

Run 350 times on local and no failure.

@abbccdda
Copy link
Copy Markdown
Author

@mjsax I suppose this should help for all integration tests, as they share EmbeddedBroker

@abbccdda
Copy link
Copy Markdown
Author

Got 2/3 green, one failed test is due to

kafka.api.SaslSslConsumerTest.testCoordinatorFailover

java.lang.AssertionError: expected:<None> but was:<Some(org.apache.kafka.clients.consumer.CommitFailedException: Offset commit cannot be completed since the consumer is not part of an active group for auto partition assignment; it is likely that the consumer was kicked out of the group.)>

@mjsax mjsax merged commit 60b912c into apache:trunk Apr 21, 2020
ijuma added a commit to confluentinc/kafka that referenced this pull request Apr 21, 2020
* apache-github/trunk:
  MINOR: Fix grammar in error message for InvalidRecordException (apache#8465)
  KAFKA-9868: Reduce number of transaction log partitions for embed broker (apache#8522)
  MINOR: Adding github whitelist (apache#8523)
  MINOR: Upgrade gradle plugins and test libraries for Java 14 support (apache#8519)
  MINOR: Further reduce runtime for metrics integration tests (apache#8514)
  MINOR: Use .asf.yaml to direct github notifications to JIRA and mailing lists (apache#8521)
  MINOR: Update to Gradle 6.3 (apache#7677)
  HOTFIX: fix checkstyle error of RocksDBStoreTest and flaky RocksDBTimestampedStoreTest.shouldOpenExistingStoreInRegularMode (apache#8515)
  MINOR: cleanup RocksDBStore tests  (apache#8510)
  KAFKA-9818: Fix flaky test in RecordCollectorTest (apache#8507)
  MINOR: reduce impact of trace logging in replica hot path (apache#8468)
  KAFKA-6145: KIP-441: Add test scenarios to ensure rebalance convergence (apache#8475)
  KAFKA-9881: Convert integration test to verify measurements from RocksDB to unit test (apache#8501)
  MINOR: improve test coverage for dynamic LogConfig(s) (apache#7616)
  MINOR: Switch order of sections on tumbling and hopping windows in streams doc. Tumbling windows are defined as "special case of hopping time windows" - but hopping windows currently only explained later in the docs. (apache#8505)
  KAFKA-9819: Fix flaky test in StoreChangelogReaderTest (apache#8488)
@abbccdda abbccdda deleted the fix_embedded_broker branch April 21, 2020 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

streams tests Test fixes (including flaky tests)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants