sunm2n commented on PR #24381:
URL: https://github.com/apache/kafka/pull/24381#issuecomment-7152510693

   Local measurements, before and after the patch. One broker, one member 
joining a new group on a three-partition topic, default 5 s heartbeat interval, 
five runs per row. "Before" is trunk at `b3e2ec22ad`, "after" is this branch at 
`45e3f218c5`. The Before and After columns show the heartbeat that carried the 
partitions and the time since the first heartbeat response.
   
   | Offloading | Assignment interval | Before | After |
   |---|---|---|---|
   | Off | 0 ms | HB2, 100–110 ms | HB2, 88–101 ms |
   | Off | 1000 ms | HB3, 5093–5109 ms | HB2, 91–106 ms |
   | On | 0 ms | HB3, 5094–5111 ms | HB2, 98–105 ms |
   | On | 1000 ms (default) | HB4, 10099–10120 ms | HB2, 88–104 ms |
   
   In the runs with the patch, initialization finished 1–6 ms after the first 
heartbeat response and the member's next heartbeat came about 100 ms after it, 
so the assignment was installed in time for that heartbeat.
   
   For an existing group, where m1 is on topic A and m2 joins on A and B, with 
the default settings m2 received B after about 5.1 s both before (5100–5119 ms) 
and after (5099–5116 ms) the patch.
   
   Notes on the tests:
   
   - 
`testShareGroupAsyncTargetAssignmentWithPartitionInitializationBeforeNextHeartbeat`
 and `...AfterNextHeartbeat` cover the two orders from the Jira discussion: 
initialization finishing before and after the member's acknowledgement 
heartbeat, with offloading on and the default assignment interval. 
`testShareGroupMemberJoinsEmptyGroupWithAssignments` covers the same flow with 
the assignor run synchronously from the timer.
   - `testShareGroupNewMemberWithExtraTopicJoinsExistingGroup` covers question 
3 from Jira. A member joins an existing group with an extra topic subscription, 
and the assignment for its join is installed before the extra topic is 
initialized. The timer then does nothing and the next heartbeat bumps the group 
epoch to assign the extra topic, as on trunk.
   - `testShareGroupPartitionInitializationTimerWithEmptyGroup` uses 
`alterShareGroupOffsets`, which creates a group without members and bumps only 
the group epoch. Without the empty group check, the timer would start an 
assignor run for it. `...WithDeletedGroup` covers the group being deleted 
before the timer fires.
   - Existing `GroupMetadataManagerTest` cases that used a mock assignor 
without initialized partitions now either replay the initialized partitions 
first or expect the member to stay at the initial assignment epoch.
   - `ShareGroupHeartbeatRequestTest` and `ShareGroupDescribeRequestTest` join 
with a topic that does not exist yet. The first run is now skipped in every 
configuration, so the member stays at epoch 1 until the topic is created. After 
that the first assignment is computed for the group epoch reached by the join 
and the metadata update, which is epoch 3 with one member in all four offload 
and interval combinations. The step that waited for the initial empty 
assignment under offloading is removed, since that assignment is no longer 
computed.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to