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

[v22.2.x] kafka/client/consumer: Shutdown and fetch improvements #7302

Merged
merged 3 commits into from
Nov 17, 2022

Conversation

BenPope
Copy link
Member

@BenPope BenPope commented Nov 16, 2022

Backport #7210

Cover letter

  • Improve failed heartbeat logging

    • Catch more error types
    • Improve log level
    • Avoid ignored exceptional future
  • Handle double-leave

    It's possible for leave to be called multiple times, for example if the Proxy is shut down during an existing leave request.

  • Handle fetch error
    Update metadata if there is a partition error so that the next fetch will work.

Backport Required

  • is a backport
  • not a bug fix
  • issue does not exist in previous branches
  • papercut/not impactful enough to backport
  • v22.2.x
  • v22.1.x
  • v21.11.x

UX changes

  • none

Release notes

Improvements

  • pandaproxy: consumer fetch: More gracefully handle partition movement
  • pandaproxy: Shut down consumers more gracefully during shutdown.

* Catch more error types
* Improve log level
* Avoid ignored exceptional future

E.g.:
```
Exceptional future ignored: kafka::client::broker_error ({ node: 1 }, { error_code: broker_not_available [8] })
```

Signed-off-by: Ben Pope <ben@redpanda.com>
(cherry picked from commit e102b59)
It's possible for leave to be called multiple times, for example
if the Proxy is shut down during an existing leave request. This
results in `stop()` being alled multiple times.

Protect against that.

E.g.:
```
DEBUG 2022-11-09 19:19:52,266 [shard 0] kafka/client - Consumer: type=leader, member_id={test_client-5e42d0ce-7653-465f-9bca-6accce840bfc}, name={}: leave_group req: {group_id={pandaproxy-group-210d7de0-a565-4503-b9a3-945967d0b9ba} member_id={test_client-5e42d0ce-7653-465f-9bca-6accce840bfc} members={}}
DEBUG 2022-11-09 19:19:52,267 [shard 0] kafka/client - broker.h:68 - Dispatch to node 1: leave_group req: {group_id={pandaproxy-group-210d7de0-a565-4503-b9a3-945967d0b9ba} member_id={test_client-5e42d0ce-7653-465f-9bca-6accce840bfc} members={}}
INFO  2022-11-09 19:19:52,268 [shard 0] kafka/client - consumer.cc:128 - Consumer: type=leader, member_id={test_client-5e42d0ce-7653-465f-9bca-6accce840bfc}, name={}: stop
DEBUG 2022-11-09 19:19:52,269 [shard 0] kafka/client - client.cc:89 - exception during stop: kafka::client::broker_error ({ node: 1 }, { error_code: broker_not_available [8] })
INFO  2022-11-09 19:19:52,269 [shard 0] kafka/client - consumer.cc:128 - Consumer: type=leader, member_id={test_client-5e42d0ce-7653-465f-9bca-6accce840bfc}, name={}: stop
redpanda: /home/ben/development/src/github.com/BenPope/redpanda-clang-13/vbuild/debug/clang/rp_deps_install/include/seastar/core/abort_source.hh:109: void seastar::abort_source::do_request_abort(std::optional<std::exception_ptr>): Assertion `_subscriptions' failed.
```

Signed-off-by: Ben Pope <ben@redpanda.com>
(cherry picked from commit bbaad57)
If there is an error on the partition, it's likely that the partition
leader moved. Handle this by updating metadata so that the next fetch
will get the partition from the correct broker.

Signed-off-by: Ben Pope <ben@redpanda.com>
(cherry picked from commit 81dc303)
@BenPope BenPope added this to the v22.2.8 milestone Nov 16, 2022
@NyaliaLui
Copy link
Contributor

Error is cause of low disk space

@NyaliaLui
Copy link
Contributor

Error is cause of low disk space

Do we restart those or ask-and-wait for devprod to address disk space?

@BenPope
Copy link
Member Author

BenPope commented Nov 16, 2022

Retry didn't work

@BenPope BenPope requested review from a team and ivotron and removed request for a team November 16, 2022 18:45
@BenPope
Copy link
Member Author

BenPope commented Nov 17, 2022

@piyushredpanda piyushredpanda merged commit c1ab9da into redpanda-data:v22.2.x Nov 17, 2022
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants