-
Notifications
You must be signed in to change notification settings - Fork 552
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
admin: stream more json results #16551
Conversation
Related is #16512 which changes the leader info to not be a |
ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/44909#018d8a68-fbbb-4ed3-8059-7bfeb407083f ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/44945#018d8eca-3c28-4245-9a10-de70c63d0c3f ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/45305#018dd74f-5f07-4228-b2b1-f5bcb3df0885 ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/45305#018dd74f-5f04-4e0a-a6c0-3a9d34eb2880 |
new failures in https://buildkite.com/redpanda/redpanda/builds/44909#018d8a68-fbc5-479e-ace6-656afd790e74:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, only nits so nothing blocking merge imo
// TODO(rockwood): get_leaders can lead to a reactor stall, fix to use | ||
// an async version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Did you file a core-internal ticket for this? I can if you like
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Michal already has a PR that I can use to fix this, just need to wait for #16512 (and backport it)
src/v/redpanda/admin/partition.cc
Outdated
#include "redpanda/admin/api-doc/debug.json.hh" | ||
#include "redpanda/admin/api-doc/partition.json.hh" | ||
#include "redpanda/admin/server.h" | ||
#include "redpanda/admin/util.h" | ||
|
||
#include <seastar/coroutine/maybe_yield.hh> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Was this include intentionally added? I ask because I don't see a yield in this commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I had tried to add it, but realized it would not be valid. I will remove the include
Force push: remove unused include |
: -1; | ||
info.previous_leader = leader_info.previous_leader.has_value() | ||
? leader_info.previous_leader.value() | ||
: -1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: It's not really part of the refactor, which is fine, but it would be nice to use .value_or(-1)
in these two places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll fix in a followup, I am going to merge as the perf team was asking about the oversized allocs
The current approach can lead to an oversized allocation. This is not a full solution as get_leaders needs to not be prone to reactor stalls and oversized allocs. Signed-off-by: Tyler Rockwood <rockwood@redpanda.com>
Signed-off-by: Tyler Rockwood <rockwood@redpanda.com>
Signed-off-by: Tyler Rockwood <rockwood@redpanda.com>
3b0ef74
4e183fe
to
3b0ef74
Compare
Force push
|
/backport v23.3.x |
/backport v23.2.x |
Failed to create a backport PR to v23.2.x branch. I tried:
|
Failed to create a backport PR to v23.3.x branch. I tried:
|
@piyushredpanda there were some significant refactoring of the admin API between v23.2 and v23.3 which makes resolving the backport issues a bit of a lift. Happy to do it if we want to prioritize it. cc @aanthony-rp |
|
||
return ss::make_ready_future<ss::json::json_return_type>(ans); | ||
return ss::make_ready_future<ss::json::json_return_type>( | ||
ss::json::stream_range_as_array( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
woah 🔥 didn't know this existed
This patch set is the result of auditing the admin server looking for places that can cause oversized allocations.
Fixes: https://github.com/redpanda-data/core-internal/issues/1063
Backports Required
Release Notes
Bug Fixes