Skip to content

Commit

Permalink
Capping heap size used by StatefulIndexPrivileges
Browse files Browse the repository at this point in the history
Signed-off-by: Nils Bandener <[email protected]>
  • Loading branch information
nibix committed Aug 2, 2024
1 parent 78db68b commit 0252f5b
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ static class StatefulIndexPrivileges {
roles.getCEntries().keySet()
);
CompactMapGroupBuilder<String, DeduplicatingCompactSubSetBuilder.SubSetBuilder<String>> indexMapBuilder =
new CompactMapGroupBuilder<>(indices.keySet(), (k2) -> roleSetBuilder.createSubSetBuilder());
new CompactMapGroupBuilder<>(indices.keySet(), (k2) -> roleSetBuilder.createSubSetBuilder());

top: for (Map.Entry<String, RoleV7> entry : roles.getCEntries().entrySet()) {
try {
Expand Down Expand Up @@ -905,10 +905,7 @@ static class StatefulIndexPrivileges {
CompactMapGroupBuilder.MapBuilder<
String,
DeduplicatingCompactSubSetBuilder.SubSetBuilder<String>> indexToRoles = actionToIndexToRoles
.computeIfAbsent(
action,
k -> indexMapBuilder.createMapBuilder()
);
.computeIfAbsent(action, k -> indexMapBuilder.createMapBuilder());

indexToRoles.get(indicesEntry.getKey()).add(roleName);

Expand Down

0 comments on commit 0252f5b

Please sign in to comment.