KAFKA-6054: Fix upgrade path from Kafka Streams v0.10.0#4768
KAFKA-6054: Fix upgrade path from Kafka Streams v0.10.0#4768mjsax merged 7 commits intoapache:1.0from
Conversation
6ae5b0b to
f0531b3
Compare
|
Upgrade system tests passed: https://jenkins.confluent.io/job/system-test-kafka-branch-builder/1598/ Triggered all streams system tests: https://jenkins.confluent.io/job/system-test-kafka-branch-builder/1599/ Passed. |
f0531b3 to
5acbb1a
Compare
Github comments John's review Guozhang's follow up
040aed6 to
ad66b12
Compare
|
Added missing system test (missing combination of versions to be tested): https://jenkins.confluent.io/job/system-test-kafka-branch-builder/1601/ Passed. |
ad66b12 to
1b94960
Compare
| @parametrize(old_version=str(LATEST_0_10_2), new_version=str(LATEST_0_11_0)) | ||
| @parametrize(old_version=str(LATEST_0_10_2), new_version=str(DEV_VERSION)) | ||
| @parametrize(old_version=str(LATEST_0_11_0), new_version=str(DEV_VERSION)) | ||
| def test_simple_upgrade(self, old_version, new_version): |
There was a problem hiding this comment.
I'd suggest update the existing test directly in this PR.
There was a problem hiding this comment.
Can you elaborate? Should we remove test_upgrade_downgrade_streams or merge this with test_upgrade_downgrade_streams ?
There was a problem hiding this comment.
This is for your comment above:
Note: 1.0 was the first branch that did contain upgrade system tests already -- I just added the new once -- we can consider to consolidate them in this PR already. LMKWYT.
I'd suggest we consolidate them in this PR already, same for 1.1
bbejeck
left a comment
There was a problem hiding this comment.
Just some minor nits otherwise LGTM.
| Thus, you need to update and recompile your code. Just swapping the Kafka Streams library jar file will not work and will break your application. </li> | ||
| <li> Upgrading from 0.10.0.x to 1.0.2 requires two rolling bounces with config <code>upgrade.from="0.10.0"</code> set for first upgrade phase | ||
| (cf. <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-268%3A+Simplify+Kafka+Streams+Rebalance+Metadata+Upgrade">KIP-268</a>). | ||
| As an alternative, and offline upgrade is also possible. |
There was a problem hiding this comment.
nit: As an alternative, an offline upgrade is also possible
| Thus, you need to update and recompile your code. Just swapping the Kafka Streams library jar file will not work and will break your application. </li> | ||
| <li> Upgrading from 0.10.0.x to 0.10.2.2 requires two rolling bounces with config <code>upgrade.from="0.10.0"</code> set for first upgrade phase | ||
| (cf. <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-268%3A+Simplify+Kafka+Streams+Rebalance+Metadata+Upgrade">KIP-268</a>). | ||
| As an alternative, and offline upgrade is also possible. |
| Thus, you need to update and recompile your code. Just swapping the Kafka Streams library jar file will not work and will break your application. </li> | ||
| <li> Upgrading from 0.10.0.x to 0.10.1.2 requires two rolling bounces with config <code>upgrade.from="0.10.0"</code> set for first upgrade phase | ||
| (cf. <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-268%3A+Simplify+Kafka+Streams+Rebalance+Metadata+Upgrade">KIP-268</a>). | ||
| As an alternative, and offline upgrade is also possible. |
| Starts 3 KafkaStreams instances with <old_version>, and upgrades one-by-one to <new_version> | ||
| """ | ||
|
|
||
| self.topics = { |
There was a problem hiding this comment.
topics defined here and in next test, maybe move up to init
There was a problem hiding this comment.
The general test run with 3 broker and creates topic with replication factor 3 an other config (and used init for setup) -- however, we need different single-broker setup here. If we cleanup and merge tests (what we should to right away or a follow up PR -- Guozhang suggested to do it in this PR) than I agree that it makes sense to unify the setup. WDYT?
|
Java 7 and Java 9 passed Java 8 failed retest this please |
03aa5e1 to
263fcfd
Compare
|
Java 8 build aborted. retest this please |
|
JDK 7 failure (https://builds.apache.org/job/kafka-pr-jdk7-scala2.11/12218/) was: JDK8 failure (https://builds.apache.org/job/kafka-pr-jdk8-scala2.12/12207/consoleFull) was: JDK9 is ongoing. |
vvcephei
left a comment
There was a problem hiding this comment.
This PR LGTM. Not sure what's up with those failing tests, but they look unrelated.
f7d669f to
dd6c414
Compare
|
Updated this. Triggered system tests: https://jenkins.confluent.io/job/system-test-kafka-branch-builder/1634/ |
07bb017 to
27ad139
Compare
27ad139 to
35d3e92
Compare
|
Consolidated system tests as requested. 1634 failed partially. Fixed. Corresponding tests passed at https://jenkins.confluent.io/job/system-test-kafka-branch-builder/1642/ Retriggered all upgrade tests again: https://jenkins.confluent.io/job/system-test-kafka-branch-builder/1643/ (passed) Call for review. |
|
Retest this please |
vvcephei
left a comment
There was a problem hiding this comment.
LGTM! Just a clarifying question.
Thanks for the consolidation.
| #@parametrize(new_version=str(LATEST_0_10_1)) we cannot run this test until Kafka 0.10.1.2 is released | ||
| #@parametrize(new_version=str(LATEST_0_10_2)) we cannot run this test until Kafka 0.10.2.2 is released | ||
| #@parametrize(new_version=str(LATEST_0_11_0)) we cannot run this test until Kafka 0.11.0.3 is released | ||
| @parametrize(new_version=str(DEV_VERSION)) |
There was a problem hiding this comment.
I did a double-take here... I think I get it now, but to check my understanding...
The plan is to wait until those patch releases, and then do something like :
@matrix(new_version=simple_upgrade_versions_metadata_version_2)
You're effectively slicing 0.10.0 out from the upgrade/downgrade test matrix because:
- upgrading from 0.10.0 requires a different algorithm (double bounce)
- downgrading to 0.10.0 is not supported
Right?
There was a problem hiding this comment.
Yes. Upgrading from 0.10.0 requires two rolling bounces including the new config upgrade.from and thus we have this extra test for it -- this new config is only available in un-release code (for older non-dev branches) and thus, we cannot run this test for those versions atm.
We chould add a downgrade test though -- but it would be a new test method, too, as it also requires two rolling bounces but with different order of command compare to this test. It would be something like:
- prepare all instances to bounce and set config
upgrade.from="0.10.0" - do first round of rolling bounce -- in this rolling bounce you stay on current version and don't downgrade yet, but only prepare all instances for downgrading (via setting the config)
- do a second round of rolling bounces downgrading to 0.10.0
I think it's not worth to add a downgrade test.
There was a problem hiding this comment.
Agreed. We have no evidence that downgrade is necessary. We don't need to document it or test it unless or until we actually choose to support it.
No description provided.