Skip to content

MINOR: Adding system test for named repartition topics#5913

Merged
guozhangwang merged 4 commits intoapache:trunkfrom
bbejeck:MINOR_create_system_test_for_named_repartition_topics
Dec 3, 2018
Merged

MINOR: Adding system test for named repartition topics#5913
guozhangwang merged 4 commits intoapache:trunkfrom
bbejeck:MINOR_create_system_test_for_named_repartition_topics

Conversation

@bbejeck
Copy link
Copy Markdown
Member

@bbejeck bbejeck commented Nov 14, 2018

This is a system test for doing a rolling upgrade of a topology with a named repartition topic.

  1. An initial Kafka Streams application is started on 3 nodes. The topology has one operation forcing a repartition and the repartition topic is explicitly named.
  2. Each node is started and processing of data is validated
  3. Then one node is stopped (full stop is verified)
  4. A property is set signaling the node to add operations to the topology before the repartition node which forces a renumbering of all operators (except repartition node)
  5. Restart the node and confirm processing records
  6. Repeat the steps for the other 2 nodes completing the rolling upgrade

I ran two runs of the system test with 25 repeats in each run for a total of 50 test runs.
All test runs passed

First 25 test runs

Second 25 test runs

Committer Checklist (excluded from commit message)

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

@bbejeck
Copy link
Copy Markdown
Member Author

bbejeck commented Nov 14, 2018

ping @guozhangwang, @mjsax, and @vvcephei for reviews

@mjsax mjsax added the streams label Nov 15, 2018
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.

nit: simplify to final String propFileName = args[0]; -- was checked above already

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

ack

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.

Should we check if all properties are set (ie, null check)?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

ack

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.

Why do we need this? This is logged anyway.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

nope taking out

@bbejeck
Copy link
Copy Markdown
Member Author

bbejeck commented Nov 16, 2018

@mjsax, thanks for the review, I've updated per your comments.

@mjsax
Copy link
Copy Markdown
Member

mjsax commented Nov 20, 2018

Call for second review @guozhangwang @vvcephei

Copy link
Copy Markdown
Contributor

@vvcephei vvcephei left a comment

Choose a reason for hiding this comment

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

Thanks, Bill! It looks good to me. just a couple of comments...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

would it clarify the pattern matching in the ducktape driver if we make this not a prefix of the other case?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

ack

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is it important to have 3 brokers for this test? I'm wondering if the tests would be more resilient and faster with just one broker and replica of each topic.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

not sure that would have an impact, but for this test, a single broker is enough, so I'll adjust it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry for the dumb question... I guess this only tails the file, so there's no danger of a false positive from seeing the patter in the file from before the restart?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes that is correct this method delegates to LogMonitor#wait_for which grabs the offset of the file when the object is created and waits for the specified pattern in the file from that point going forward

https://github.com/confluentinc/ducktape/blob/master/ducktape/cluster/remoteaccount.py#L586
https://github.com/confluentinc/ducktape/blob/master/ducktape/cluster/remoteaccount.py#L675

@bbejeck bbejeck force-pushed the MINOR_create_system_test_for_named_repartition_topics branch from 95388cb to 91c2b7c Compare November 27, 2018 16:22
@bbejeck
Copy link
Copy Markdown
Member Author

bbejeck commented Nov 27, 2018

updated this and rebased from trunk

@bbejeck
Copy link
Copy Markdown
Member Author

bbejeck commented Nov 27, 2018

@mjsax
Copy link
Copy Markdown
Member

mjsax commented Nov 27, 2018

Retest this please.

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 -- assuming Jenkins passes

@guozhangwang guozhangwang merged commit ab1fb3f into apache:trunk Dec 3, 2018
pengxiaolong pushed a commit to pengxiaolong/kafka that referenced this pull request Jun 14, 2019
This is a system test for doing a rolling upgrade of a topology with a named repartition topic.

1. An initial Kafka Streams application is started on 3 nodes. The topology has one operation forcing a repartition and the repartition topic is explicitly named.
2. Each node is started and processing of data is validated
3. Then one node is stopped (full stop is verified)
4. A property is set signaling the node to add operations to the topology before the repartition node which forces a renumbering of all operators (except repartition node)
5. Restart the node and confirm processing records
6. Repeat the steps for the other 2 nodes completing the rolling upgrade

I ran two runs of the system test with 25 repeats in each run for a total of 50 test runs.
All test runs passed

Reviewers: John Roesler <john@confluent.io>, Matthias J. Sax <matthias@confluent.io>
@bbejeck bbejeck deleted the MINOR_create_system_test_for_named_repartition_topics branch July 10, 2024 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants