You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "andymg3 (via GitHub)" <gi...@apache.org> on 2023/07/06 11:37:23 UTC
[GitHub] [kafka] andymg3 opened a new pull request, #13968: KAFKA-15149: Fix not sending UMR and LISR RPCs in dual-write mode when there are new partitions
andymg3 opened a new pull request, #13968:
URL: https://github.com/apache/kafka/pull/13968
### JIRA
https://issues.apache.org/jira/browse/KAFKA-15149
### Description
Fixes a bug where we don't send UMR and LISR requests in dual-write mode when there are new partitions created/added. By mutating `changedPartitions` the code later on in `MigrationPropagator` does not see there are changed partitions and so does not send LISR requests when it should. This is reproducible by running the enhanced version of `ZkMigrationIntegrationTest.testNewAndChangedTopicsInDualWrite` that is updated as part of this PR. So the fix is to create a copy of the partitions metadata so we can mutate it but just locally.
There are other options to make sure the code in `KRaftMigrationDriver` can't make side effects that affect other components. For example it'd be possible to enhance `TopicDelta` to create the copy. But this is not consistent with the accessors in other places in the `image` package. Or `TopicDelta` could return an immutable copy using something like `Collections.unmodifiableMap(changedTopics)` but this is problematic because the code in `KRaftMigrationDriver` really does need to mutate the collection and so would have to create a copy anyway.
### Testing
Enhances `ZkMigrationIntegrationTest.testNewAndChangedTopicsInDualWrite` to check the admin client returns the partition increase. This test indeed fails without the changes to `KRaftMigrationZkWriter`
### Committer Checklist (excluded from commit message)
- [ ] Verify design and implementation
- [ ] Verify test coverage and CI build status
- [ ] Verify documentation (including upgrade notes)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] mumrah merged pull request #13968: KAFKA-15149: Fix not sending UMR and LISR RPCs in dual-write mode when there are new partitions
Posted by "mumrah (via GitHub)" <gi...@apache.org>.
mumrah merged PR #13968:
URL: https://github.com/apache/kafka/pull/13968
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org