Skip to content
This repository was archived by the owner on Jan 24, 2024. It is now read-only.

Remove closed KafkaTopicConsumerManager from cache - #659

Merged
BewareMyPower merged 1 commit into
streamnative:masterfrom
BewareMyPower:bewaremypower/remove-tcm-cache
Aug 18, 2021
Merged

Remove closed KafkaTopicConsumerManager from cache#659
BewareMyPower merged 1 commit into
streamnative:masterfrom
BewareMyPower:bewaremypower/remove-tcm-cache

Conversation

@BewareMyPower

Copy link
Copy Markdown
Contributor

Motivation

When KafkaTopicConsumerManager#removeCursorFuture() returns null, it means the TCM (KafkaTopicConsumerManager instance) is closed accidentally. However, in this case, the TCM was not removed from KafkaTopicConsumer.consumerTopicManagers currently. Then next time topicManager.getTopicConsumerManager could still return the closed TCM.

Modifications

When KafkaTopicConsumerManager#removeCursorFuture() returns null, remove the TCM from cache.

@BewareMyPower
BewareMyPower merged commit fc5767d into streamnative:master Aug 18, 2021
@BewareMyPower
BewareMyPower deleted the bewaremypower/remove-tcm-cache branch August 18, 2021 02:21
BewareMyPower added a commit that referenced this pull request Aug 19, 2021
### Motivation

When `KafkaTopicConsumerManager#removeCursorFuture()` returns null, it means the TCM (`KafkaTopicConsumerManager` instance) is closed accidentally. However, in this case, the TCM was not removed from `KafkaTopicConsumer.consumerTopicManagers` currently. Then next time `topicManager.getTopicConsumerManager` could still return the closed TCM.

### Modifications

When `KafkaTopicConsumerManager#removeCursorFuture()` returns null, remove the TCM from cache.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants