-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
What is the bug?
Having too many outstanding TransportBulkAction request can lead to memory build up on the node as the each request handler holds a reference to cluster state object.
protected void doRun() {
assert bulkRequest != null;
final ClusterState clusterState = observer.setAndGetObservedState();
if (handleBlockExceptions(clusterState)) {
return;
}
final ConcreteIndices concreteIndices = new ConcreteIndices(clusterState, indexNameExpressionResolver);
Metadata metadata = clusterState.metadata();
OpenSearch/server/src/main/java/org/opensearch/action/bulk/TransportBulkAction.java
Lines 936 to 941 in 6b5c08a
| static class ConcreteIndices { | |
| private final ClusterState state; | |
| private final IndexNameExpressionResolver indexNameExpressionResolver; | |
| private final Map<String, Index> indices = new HashMap<>(); | |
| ConcreteIndices(ClusterState state, IndexNameExpressionResolver indexNameExpressionResolver) { |
static class ConcreteIndices {
private final ClusterState state;
private final IndexNameExpressionResolver indexNameExpressionResolver;
private final Map<String, Index> indices = new HashMap<>();
ConcreteIndices(ClusterState state, IndexNameExpressionResolver indexNameExpressionResolver) {
The high memory JVM pressure was observed on a cluster where there were 500+ outstanding indexing request on a node and the cluster state size was 55MB, a total of 30GB memory was consumed in this case.
500 cluster state objects

Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working