Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix][client] Client interceptors close method not called after producer/consumer/reader close #23830

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Shawyeok
Copy link
Contributor

@Shawyeok Shawyeok commented Jan 9, 2025

Motivation

The close methods in client interceptors (ProducerInterceptor#close, ConsumerInterceptor#close, ReaderInterceptor#close) allow interceptor developers to release resources allocated in the interceptor when a producer, consumer, or reader is closed.

However, these close methods were not invoked in the implementation of PIP-23.

Modifications

  • Ensure the close methods of interceptors are called during the final stage of the closing process.
  • Add unit tests to verify this behavior.

Verifying this Change

  • Verified that the change passes all CI checks.

This change includes the following tests:

  • Integration tests for ProducerInterceptor with non-partitioned and partitioned topics.
  • Integration tests for ConsumerInterceptor with non-partitioned and partitioned topics.
  • Integration tests for ConsumerInterceptor with ZeroQueueConsumerImpl
  • Integration tests for ReaderInterceptor with non-partitioned and partitioned topics.

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository: Shawyeok#23

…cer/consumer/reader close

Call interceptors close method before close methods return.
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Jan 9, 2025
@Shawyeok
Copy link
Contributor Author

Shawyeok commented Jan 9, 2025

@codelipenghui Please feel free take a look, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-not-needed Your PR changes do not impact docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant