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

test: stress test client shutdown in the proxy client cache #6855

Merged
merged 1 commit into from
Oct 31, 2022

Conversation

NyaliaLui
Copy link
Contributor

@NyaliaLui NyaliaLui commented Oct 20, 2022

Cover letter

Recent changes to the Pandaproxy involved creating a kafka client cache to support multiple authenticated connections. The client connection is closed when a client is evicted from the cache. Therefore, this PR adds a concurrency test that issues many requests to the proxy such that a client connection should be closed while other requests are still running.

Closes #6595

Changes from force-push 4067481:

  • Refactor error checking in the ducktape test
  • Describe how the new test adds stress to the commit message
  • Dropped the commits that made fetch_or_insert async
  • Dropped the commits that brought client stop() inline

Backport Required

  • 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

  • Add a ducktape test that checks client shutdown when there are ongoing requests

@NyaliaLui NyaliaLui self-assigned this Oct 20, 2022
tests/rptest/services/redpanda.py Show resolved Hide resolved
tests/rptest/tests/pandaproxy_test.py Show resolved Hide resolved
src/v/pandaproxy/kafka_client_cache.cc Outdated Show resolved Hide resolved
@NyaliaLui
Copy link
Contributor Author

This is ready for review as well.

@NyaliaLui
Copy link
Contributor Author

/ci-repeat 5

src/v/pandaproxy/kafka_client_cache.cc Outdated Show resolved Hide resolved
src/v/pandaproxy/test/kafka_client_cache.cc Outdated Show resolved Hide resolved
tests/rptest/tests/pandaproxy_test.py Outdated Show resolved Hide resolved
src/v/pandaproxy/kafka_client_cache.cc Outdated Show resolved Hide resolved
src/v/pandaproxy/kafka_client_cache.cc Outdated Show resolved Hide resolved
tests/rptest/tests/pandaproxy_test.py Show resolved Hide resolved
The kafka client stop() method is called whenever a client is evicted
from the LRU cache. This commit adds a ducktape test that configures the
cache to a max size of 1. The test stresses client stop() by issuing
many rest requests with two unique users within a 30s loop. The idea is
tigger eviction, and consequently client stop(), many times.

Closes redpanda-data#6595

This commit also adds options to the RedpandaService for the client
cache keep alive and client cache max size configs.
@NyaliaLui
Copy link
Contributor Author

/ci-repeat 5

@NyaliaLui
Copy link
Contributor Author

Failures are unrelated to this PR:
#6991
#7011

I'll retrigger CI

@dotnwat dotnwat merged commit e347729 into redpanda-data:dev Oct 31, 2022
@NyaliaLui NyaliaLui deleted the basic-auth-client-stop-test branch November 18, 2022 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/pandaproxy REST interface for Kafka API area/tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stress testing for client shutdown in panda proxy client cache
3 participants