[ISSUE #10435] Fix shared ClientChannelInfo preventing inactive channel expiry#10437
Open
chuanxo wants to merge 1 commit into
Open
[ISSUE #10435] Fix shared ClientChannelInfo preventing inactive channel expiry#10437chuanxo wants to merge 1 commit into
chuanxo wants to merge 1 commit into
Conversation
… channel expiry
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which Issue(s) This PR Fixes
Brief Description
ClientManageProcessor.heartBeat()在循环外只创建了一个ClientChannelInfo实例,多个 consumer/producer group 共享同一引用。ConsumerGroupInfo.updateChannel()更新lastUpdateTimestamp时会影响所有 group,导致scanNotActiveChannel()无法正确过期清理已下线的 group channel。修复方式:将
new ClientChannelInfo(...)移到循环体内,每个 group 持有独立实例。How Did You Test This Change?
在
ClientManageProcessorTest中新增testHeartbeatMultiGroupChannelIndependentExpiry,验证多 group 心跳场景下各 group 的ClientChannelInfo互相独立,未续期的 group channel 能被正常过期清理。