Skip to content

KAFKA-1543: Change replication factor during partition map generation#1596

Closed
llamahunter wants to merge 1 commit into
apache:trunkfrom
TiVo:re-replicate-topic
Closed

KAFKA-1543: Change replication factor during partition map generation#1596
llamahunter wants to merge 1 commit into
apache:trunkfrom
TiVo:re-replicate-topic

Conversation

@llamahunter

Copy link
Copy Markdown

If the topic-to-move-json-file contains a new replication-factor for
a topic, it is used when assigning partitions to brokers. If missing,
the existing replication-factor of the topic is maintained.

@llamahunter

Copy link
Copy Markdown
Author

Starting the conversation with this pull request. It seems to work well, and is minimally invasive to the code and command line tool API. I think this is a better approach than putting replication-factor changes in kafka-topics.sh --alter because the replication re-assignment is likely going to require a lot of partition copying, and it's probably better to review the effect rather than it being hidden.

I bumped the 'version' on the topics to move json file, but it turns out no one looks at the version number, anyway. It's backwards compatible with version 1, and old code getting a version 2 file will just ignore the new fields.

@llamahunter

Copy link
Copy Markdown
Author

It's unclear what that failed check is about. I can't see how this change could have affected consumer pattern subscription. I suspect fragile tests.

@llamahunter

Copy link
Copy Markdown
Author

Looked at a few other recent pull requests. Even documentation-only changes are causing the consumer tests to fail. Looks like broken tests.

@tom-pang

Copy link
Copy Markdown
Contributor

@llamahunter try rebasing against trunk? My patch for 3933 has had passing tests just fine.

If the topic-to-move-json-file contains a new replication-factor for
a topic, it is used when assigning partitions to brokers.  If missing,
the existing replication-factor of the topic is maintained.
@guozhangwang

Copy link
Copy Markdown
Contributor

@hachikuji Could you take a look at this PR? @llamahunter Could you change the title to KAFKA-1543: Change... so that the JIRA can be linked?

@asfbot

asfbot commented Dec 21, 2016

Copy link
Copy Markdown

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.11/324/
Test FAILed (JDK 8 and Scala 2.11).

@asfbot

asfbot commented Dec 21, 2016

Copy link
Copy Markdown

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk7-scala2.10/322/
Test FAILed (JDK 7 and Scala 2.10).

@asfbot

asfbot commented Dec 21, 2016

Copy link
Copy Markdown

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.12/323/
Test PASSed (JDK 8 and Scala 2.12).

@llamahunter llamahunter changed the title Change replication factor during partition map generation KAFKA-1543: Change replication factor during partition map generation Dec 28, 2016
@llamahunter

Copy link
Copy Markdown
Author

Hi... back from a lengthy vacation. What happened with this pull request? Did you go with the kafka-topics.sh approach rather than kafka-reassign-partitions.sh?

@guozhangwang

Copy link
Copy Markdown
Contributor

@llamahunter I don't think there is a decision on which script to augment yet. Although @jkreps once suggested doing it in kafka-topics.sh, your response on the JIRA and this PR is still targeted at reassign-partition script.

@llamahunter

Copy link
Copy Markdown
Author

I disagree with Jay in putting it in kafka-topics.sh for the reasons I stated above. Changing replication factor is a heavy-weight operation.

@cloudyday

Copy link
Copy Markdown

This feature is still interesting to me. Just checking in.

@msilb

msilb commented Jun 9, 2020

Copy link
Copy Markdown

I see the parent issue has been open since 2014. Any idea when this finally is going to be implemented?

@jamiealquiza

Copy link
Copy Markdown

Found this issue while browsing for something else, but fwiw my topicmappr cli tool does exactly this: topicmappr rebuild --topics <your-topic> --brokers -1 --replication n. Creates a compatible file that can now be assigned or otherwise worked with.

@wlarch

wlarch commented Sep 19, 2023

Copy link
Copy Markdown

I have been looking to increase the replicationFactor for the topics of our application because we added brokers to the Kafka cluster. It appears to be possible using the following documentation :

https://kafka.apache.org/documentation/#basic_ops_increase_replication_factor

@github-actions

Copy link
Copy Markdown

This PR is being marked as stale since it has not had any activity in 90 days. If you
would like to keep this PR alive, please leave a comment asking for a review. If the PR has
merge conflicts, update it with the latest from the base branch.

If you are having difficulty finding a reviewer, please reach out on the [mailing list](https://kafka.apache.org/contact).

If this PR is no longer valid or desired, please feel free to close it. If no activity occurs in the next 30 days, it will be automatically closed.

@github-actions github-actions Bot added the stale Stale PRs label Sep 11, 2024
@github-actions

Copy link
Copy Markdown

This PR has been closed since it has not had any activity in 120 days. If you feel like this
was a mistake, or you would like to continue working on it, please feel free to re-open the
PR and ask for a review.

@github-actions github-actions Bot added the closed-stale PRs that were closed due to inactivity label Oct 12, 2024
@github-actions github-actions Bot closed this Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

closed-stale PRs that were closed due to inactivity stale Stale PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants