Skip to content

Commit

Permalink
k/connection_context: replaced node hash map with chunked hash map
Browse files Browse the repository at this point in the history
Replaced `node_hash_map` keeping state of virtualized connections with
`chunked_hash_map`. The change will allow us to avoid large allocations
when dealing with large virtual connection number.

Signed-off-by: Michał Maślanka <michal@redpanda.com>
  • Loading branch information
mmaslankaprv committed May 15, 2024
1 parent 953135b commit cb96979
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/v/kafka/server/connection_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#pragma once
#include "base/seastarx.h"
#include "config/property.h"
#include "container/chunked_hash_map.h"
#include "kafka/server/fwd.h"
#include "kafka/server/handlers/handler_probe.h"
#include "kafka/server/logger.h"
Expand Down Expand Up @@ -437,7 +438,7 @@ class connection_context final
* A map keeping virtual connection states, during default operation the map
* is empty
*/
absl::node_hash_map<
chunked_hash_map<
virtual_connection_id,
ss::lw_shared_ptr<virtual_connection_state>>
_virtual_states;
Expand Down

0 comments on commit cb96979

Please sign in to comment.