Skip to content

MINOR: Prevent creating partition.metadata until ID can be written#10100

Merged
junrao merged 5 commits intoapache:2.8from
jolshan:2.8
Feb 11, 2021
Merged

MINOR: Prevent creating partition.metadata until ID can be written#10100
junrao merged 5 commits intoapache:2.8from
jolshan:2.8

Conversation

@jolshan
Copy link
Copy Markdown
Member

@jolshan jolshan commented Feb 10, 2021

I'm porting #10041 to the 2.8 branch.

Currently the partition.metadata file is created when the log is created. However, clusters with older inter-broker protocols will never use this file. This PR moves the creation of the file to when we write to the file.

This PR also deletes the partition.metadata file on startup if the IBP version is lower than 2.8.

Committer Checklist (excluded from commit message)

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

@jolshan
Copy link
Copy Markdown
Member Author

jolshan commented Feb 11, 2021

Test failures seem to be mostly known flakes. Tests that failed passed locally.
https://issues.apache.org/jira/browse/KAFKA-9295
https://issues.apache.org/jira/browse/KAFKA-12283
https://issues.apache.org/jira/browse/KAFKA-9009

Copy link
Copy Markdown
Contributor

@junrao junrao left a comment

Choose a reason for hiding this comment

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

@jolshan : Thanks for the PR. LGTM

@junrao junrao merged commit 79fda69 into apache:2.8 Feb 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants