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

Remove and close TCM according to client address - #794

Merged
BewareMyPower merged 4 commits into
streamnative:masterfrom
BewareMyPower:bewaremypower/close-tcm-address
Oct 9, 2021
Merged

Remove and close TCM according to client address#794
BewareMyPower merged 4 commits into
streamnative:masterfrom
BewareMyPower:bewaremypower/close-tcm-address

Conversation

@BewareMyPower

Copy link
Copy Markdown
Collaborator

Fixes #773

Motivation

See #773 for details.

Modifications

Add a removeAndCloseByAddress method to be called instead of close in KafkaTopicManager#close. Rename the current removeAndClose to removeAndCloseByTopic to differ these two methods. As for the cursorExpireTask, only cancel it in KafkaProtocolHandler#close.

Add a test to verify the close of any producer doesn't affect the TCM cache, and the close of any consumer only affects the cache associated with the consumer's address.

@BewareMyPower

Copy link
Copy Markdown
Collaborator Author

PTAL @Demogorgon314

@Demogorgon314 Demogorgon314 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@BewareMyPower
BewareMyPower merged commit a640b75 into streamnative:master Oct 9, 2021
@BewareMyPower
BewareMyPower deleted the bewaremypower/close-tcm-address branch October 9, 2021 13:13
BewareMyPower added a commit that referenced this pull request Oct 20, 2021
Fixes #773 

### Motivation

See #773 for details.

### Modifications

Add a `removeAndCloseByAddress` method to be called instead of `close` in `KafkaTopicManager#close`. Rename the current `removeAndClose` to `removeAndCloseByTopic` to differ these two methods. As for the `cursorExpireTask`, only cancel it in `KafkaProtocolHandler#close`.

Add a test to verify the close of any producer doesn't affect the TCM cache, and the close of any consumer only affects the cache associated with the consumer's address.
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.

[BUG] The close method of TCM Cache was not correct

2 participants