You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/12/12 22:38:53 UTC
[GitHub] [kafka] CalvinConfluent opened a new pull request, #12982: MINOR: Fix UT in KAFKA-14372
CalvinConfluent opened a new pull request, #12982:
URL: https://github.com/apache/kafka/pull/12982
Even if the follower is the ISR, the follower will be excluded because the logEndOffset (-1) is less than the fetchOffset (0)
```
if (partition.inSyncReplicaIds.contains(replica.brokerId) &&
replicaState.logEndOffset >= fetchOffset &&
replicaState.logStartOffset <= fetchOffset)
```
https://github.com/CalvinConfluent/kafka/blob/trunk/core/src/main/scala/kafka/server/ReplicaManager.scala#L1252
So the test needs to update its logEndOffset by appending one message.
### 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] dajac commented on a diff in pull request #12982: MINOR: Fix UT in KAFKA-14372
Posted by GitBox <gi...@apache.org>.
dajac commented on code in PR #12982:
URL: https://github.com/apache/kafka/pull/12982#discussion_r1048243221
##########
core/src/test/scala/unit/kafka/server/ReplicaManagerTest.scala:
##########
@@ -1323,6 +1323,17 @@ class ReplicaManagerTest {
replicaManager.becomeLeaderOrFollower(2, leaderAndIsrRequest, (_, _) => ())
+ appendRecords(replicaManager, tp0, TestUtils.singletonRecords(s"message".getBytes)).onFire { response =>
+ assertEquals(Errors.NONE, response.error)
+ }
+ // fetch as follower to advance the high watermark
Review Comment:
nit: Should we say `Fetch as follower to initialise the log end offset of the replica`? Because this is what we need in the condition that you mentioned.
--
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] dajac commented on pull request #12982: MINOR: Fix testPreferredReplicaAsLeaderWhenSameRackFollowerIsOutOfIsr
Posted by GitBox <gi...@apache.org>.
dajac commented on PR #12982:
URL: https://github.com/apache/kafka/pull/12982#issuecomment-1361022525
Merged to trunk, 3.4 and 3.3.
--
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] dajac merged pull request #12982: MINOR: Fix testPreferredReplicaAsLeaderWhenSameRackFollowerIsOutOfIsr
Posted by GitBox <gi...@apache.org>.
dajac merged PR #12982:
URL: https://github.com/apache/kafka/pull/12982
--
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