Skip to content

Commit

Permalink
ntp_callbacks: Switch to chunked_hash_map
Browse files Browse the repository at this point in the history
For super high partition topics at high partition density these can lead
to oversized allocs due to the use of `absl::flat_hash_map`.

Switch to chunked_hash_map.
  • Loading branch information
StephanDollberg committed Dec 18, 2024
1 parent 7543221 commit 7c809fd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/v/cluster/ntp_callbacks.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
#pragma once

#include "cluster/notification.h"
#include "container/chunked_hash_map.h"
#include "model/fundamental.h"

#include <absl/container/flat_hash_map.h>

namespace cluster {

/**
Expand Down Expand Up @@ -148,7 +147,7 @@ class ntp_callbacks {
template<typename Key, typename Value>
struct node {
callbacks_t callbacks;
absl::flat_hash_map<Key, Value> next;
chunked_hash_map<Key, Value> next;
};

notification_id_type
Expand Down

0 comments on commit 7c809fd

Please sign in to comment.