Seems to be one off failure because of closer resource.


**Build scan:**
https://gradle-enterprise.elastic.co/s/tbfsjsm4iujyk/tests/:x-pack:plugin:ml:qa:ml-with-security:yamlRestTest/org.elasticsearch.smoketest.MlWithSecurityIT/test%20%7Byaml=ml%2Ffrequent_item_sets_agg%2FTest%20frequent%20item%20sets%20filter%7D

**Reproduction line:**
```
./gradlew ':x-pack:plugin:ml:qa:ml-with-security:yamlRestTest' --tests "org.elasticsearch.smoketest.MlWithSecurityIT.test {yaml=ml/frequent_item_sets_agg/Test frequent item sets filter}" -Dtests.seed=AB9BDFBDA7D09640 -Dtests.locale=ga -Dtests.timezone=EST5EDT -Druntime.java=20
```

**Applicable branches:**
main

**Reproduces locally?:**
doesn't reproduce 


**Failure history:**
https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.smoketest.MlWithSecurityIT&tests.test=test%20%7Byaml%3Dml/frequent_item_sets_agg/Test%20frequent%20item%20sets%20filter%7D

**Failure excerpt:**
```
java.lang.AssertionError: Failure at [ml/frequent_item_sets_agg:340]: expected [2xx] status code but api [search] returned [500 Internal Server Error] [{"error":{"root_cause":[],"type":"search_phase_execution_exception","reason":"","phase":"fetch","grouped":true,"failed_shards":[],"caused_by":{"type":"illegal_state_exception","reason":"already closed","stack_trace":"java.lang.IllegalStateException: already closed\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.breaker.PreallocatedCircuitBreakerService$PreallocatedCircuitBreaker.addWithoutBreaking(PreallocatedCircuitBreakerService.java:131)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.search.aggregations.AggregatorBase.addRequestCircuitBreakerBytes(AggregatorBase.java:148)\n\tat org.elasticsearch.ml@8.9.0-SNAPSHOT/org.elasticsearch.xpack.ml.aggs.frequentitemsets.mr.ItemSetMapReduceAggregator.lambda$new$0(ItemSetMapReduceAggregator.java:108)\n\tat org.elasticsearch.ml@8.9.0-SNAPSHOT/org.elasticsearch.xpack.ml.aggs.frequentitemsets.mr.DelegatingCircuitBreakerService$DelegatingCircuitBreaker.addWithoutBreaking(DelegatingCircuitBreakerService.java:92)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.BigArrays.adjustBreaker(BigArrays.java:477)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.AbstractArray.close(AbstractArray.java:28)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.IOUtils.close(IOUtils.java:71)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.IOUtils.close(IOUtils.java:87)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.IOUtils.close(IOUtils.java:63)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.Releasables.close(Releasables.java:73)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.Releasables.close(Releasables.java:41)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.BytesRefArray.close(BytesRefArray.java:117)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.IOUtils.close(IOUtils.java:71)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.IOUtils.close(IOUtils.java:87)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.IOUtils.close(IOUtils.java:63)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.Releasables.close(Releasables.java:73)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.Releasables.close(Releasables.java:41)\n\tat org.elasticsearch.ml@8.9.0-SNAPSHOT/org.elasticsearch.xpack.ml.aggs.frequentitemsets.ImmutableTransactionStore.close(ImmutableTransactionStore.java:142)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.IOUtils.close(IOUtils.java:71)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.Releasables.close(Releasables.java:33)\n\tat org.elasticsearch.ml@8.9.0-SNAPSHOT/org.elasticsearch.xpack.ml.aggs.frequentitemsets.EclatMapReducer.lambda$reduce$0(EclatMapReducer.java:344)\n\tat java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)\n\tat java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)\n\tat java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)\n\tat java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)\n\tat java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)\n\tat java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)\n\tat java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)\n\tat java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)\n\tat java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)\n\tat java.base/java.util.stream.ReferencePipeline.forEachOrdered(ReferencePipeline.java:601)\n\tat org.elasticsearch.ml@8.9.0-SNAPSHOT/org.elasticsearch.xpack.ml.aggs.frequentitemsets.EclatMapReducer.reduce(EclatMapReducer.java:332)\n\tat org.elasticsearch.ml@8.9.0-SNAPSHOT/org.elasticsearch.xpack.ml.aggs.frequentitemsets.EclatMapReducer.reduce(EclatMapReducer.java:69)\n\tat org.elasticsearch.ml@8.9.0-SNAPSHOT/org.elasticsearch.xpack.ml.aggs.frequentitemsets.mr.InternalItemSetMapReduceAggregation.reduce(InternalItemSetMapReduceAggregation.java:122)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.search.aggregations.InternalAggregations.reduce(InternalAggregations.java:159)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.search.aggregations.InternalAggregations.topLevelReduce(InternalAggregations.java:106)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.SearchPhaseController.reduceAggs(SearchPhaseController.java:631)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.SearchPhaseController.reducedQueryPhase(SearchPhaseController.java:594)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.QueryPhaseResultConsumer.reduce(QueryPhaseResultConsumer.java:138)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.FetchSearchPhase.innerRun(FetchSearchPhase.java:104)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.FetchSearchPhase$1.doRun(FetchSearchPhase.java:90)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:33)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:983)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)\n\tat java.base/java.lang.Thread.run(Thread.java:1623)\n"},"stack_trace":"Failed to execute phase [fetch], \n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.AbstractSearchAsyncAction.onPhaseFailure(AbstractSearchAsyncAction.java:729)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.FetchSearchPhase$1.onFailure(FetchSearchPhase.java:95)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:28)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:33)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:983)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)\n\tat java.base/java.lang.Thread.run(Thread.java:1623)\nCaused by: java.lang.IllegalStateException: already closed\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.breaker.PreallocatedCircuitBreakerService$PreallocatedCircuitBreaker.addWithoutBreaking(PreallocatedCircuitBreakerService.java:131)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.search.aggregations.AggregatorBase.addRequestCircuitBreakerBytes(AggregatorBase.java:148)\n\tat org.elasticsearch.ml@8.9.0-SNAPSHOT/org.elasticsearch.xpack.ml.aggs.frequentitemsets.mr.ItemSetMapReduceAggregator.lambda$new$0(ItemSetMapReduceAggregator.java:108)\n\tat org.elasticsearch.ml@8.9.0-SNAPSHOT/org.elasticsearch.xpack.ml.aggs.frequentitemsets.mr.DelegatingCircuitBreakerService$DelegatingCircuitBreaker.addWithoutBreaking(DelegatingCircuitBreakerService.java:92)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.BigArrays.adjustBreaker(BigArrays.java:477)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.AbstractArray.close(AbstractArray.java:28)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.IOUtils.close(IOUtils.java:71)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.IOUtils.close(IOUtils.java:87)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.IOUtils.close(IOUtils.java:63)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.Releasables.close(Releasables.java:73)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.Releasables.close(Releasables.java:41)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.BytesRefArray.close(BytesRefArray.java:117)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.IOUtils.close(IOUtils.java:71)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.IOUtils.close(IOUtils.java:87)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.IOUtils.close(IOUtils.java:63)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.Releasables.close(Releasables.java:73)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.Releasables.close(Releasables.java:41)\n\tat org.elasticsearch.ml@8.9.0-SNAPSHOT/org.elasticsearch.xpack.ml.aggs.frequentitemsets.ImmutableTransactionStore.close(ImmutableTransactionStore.java:142)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.IOUtils.close(IOUtils.java:71)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.Releasables.close(Releasables.java:33)\n\tat org.elasticsearch.ml@8.9.0-SNAPSHOT/org.elasticsearch.xpack.ml.aggs.frequentitemsets.EclatMapReducer.lambda$reduce$0(EclatMapReducer.java:344)\n\tat java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)\n\tat java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)\n\tat java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)\n\tat java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)\n\tat java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)\n\tat java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)\n\tat java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)\n\tat java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)\n\tat java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)\n\tat java.base/java.util.stream.ReferencePipeline.forEachOrdered(ReferencePipeline.java:601)\n\tat org.elasticsearch.ml@8.9.0-SNAPSHOT/org.elasticsearch.xpack.ml.aggs.frequentitemsets.EclatMapReducer.reduce(EclatMapReducer.java:332)\n\tat org.elasticsearch.ml@8.9.0-SNAPSHOT/org.elasticsearch.xpack.ml.aggs.frequentitemsets.EclatMapReducer.reduce(EclatMapReducer.java:69)\n\tat org.elasticsearch.ml@8.9.0-SNAPSHOT/org.elasticsearch.xpack.ml.aggs.frequentitemsets.mr.InternalItemSetMapReduceAggregation.reduce(InternalItemSetMapReduceAggregation.java:122)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.search.aggregations.InternalAggregations.reduce(InternalAggregations.java:159)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.search.aggregations.InternalAggregations.topLevelReduce(InternalAggregations.java:106)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.SearchPhaseController.reduceAggs(SearchPhaseController.java:631)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.SearchPhaseController.reducedQueryPhase(SearchPhaseController.java:594)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.QueryPhaseResultConsumer.reduce(QueryPhaseResultConsumer.java:138)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.FetchSearchPhase.innerRun(FetchSearchPhase.java:104)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.FetchSearchPhase$1.doRun(FetchSearchPhase.java:90)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)\n\t... 6 more\n"},"status":500}]

  at __randomizedtesting.SeedInfo.seed([AB9BDFBDA7D09640:23CFE067092CFBB8]:0)
  at org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase.executeSection(ESClientYamlSuiteTestCase.java:572)
  at org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase.test(ESClientYamlSuiteTestCase.java:524)
  at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
  at java.lang.reflect.Method.invoke(Method.java:578)
  at com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1758)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:946)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:982)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:996)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.tests.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:48)
  at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
  at org.apache.lucene.tests.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:45)
  at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
  at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl.forkTimeoutingTask(ThreadLeakControl.java:843)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$3.evaluate(ThreadLeakControl.java:490)
  at com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:955)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:840)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:891)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:902)
  at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.tests.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:38)
  at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
  at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.tests.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:53)
  at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
  at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
  at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
  at org.apache.lucene.tests.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:47)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl.lambda$forkTimeoutingTask$0(ThreadLeakControl.java:850)
  at java.lang.Thread.run(Thread.java:1623)

  Caused by: java.lang.AssertionError: expected [2xx] status code but api [search] returned [500 Internal Server Error] [{"error":{"root_cause":[],"type":"search_phase_execution_exception","reason":"","phase":"fetch","grouped":true,"failed_shards":[],"caused_by":{"type":"illegal_state_exception","reason":"already closed","stack_trace":"java.lang.IllegalStateException: already closed\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.breaker.PreallocatedCircuitBreakerService$PreallocatedCircuitBreaker.addWithoutBreaking(PreallocatedCircuitBreakerService.java:131)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.search.aggregations.AggregatorBase.addRequestCircuitBreakerBytes(AggregatorBase.java:148)\n\tat org.elasticsearch.ml@8.9.0-SNAPSHOT/org.elasticsearch.xpack.ml.aggs.frequentitemsets.mr.ItemSetMapReduceAggregator.lambda$new$0(ItemSetMapReduceAggregator.java:108)\n\tat org.elasticsearch.ml@8.9.0-SNAPSHOT/org.elasticsearch.xpack.ml.aggs.frequentitemsets.mr.DelegatingCircuitBreakerService$DelegatingCircuitBreaker.addWithoutBreaking(DelegatingCircuitBreakerService.java:92)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.BigArrays.adjustBreaker(BigArrays.java:477)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.AbstractArray.close(AbstractArray.java:28)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.IOUtils.close(IOUtils.java:71)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.IOUtils.close(IOUtils.java:87)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.IOUtils.close(IOUtils.java:63)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.Releasables.close(Releasables.java:73)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.Releasables.close(Releasables.java:41)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.BytesRefArray.close(BytesRefArray.java:117)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.IOUtils.close(IOUtils.java:71)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.IOUtils.close(IOUtils.java:87)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.IOUtils.close(IOUtils.java:63)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.Releasables.close(Releasables.java:73)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.Releasables.close(Releasables.java:41)\n\tat org.elasticsearch.ml@8.9.0-SNAPSHOT/org.elasticsearch.xpack.ml.aggs.frequentitemsets.ImmutableTransactionStore.close(ImmutableTransactionStore.java:142)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.IOUtils.close(IOUtils.java:71)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.Releasables.close(Releasables.java:33)\n\tat org.elasticsearch.ml@8.9.0-SNAPSHOT/org.elasticsearch.xpack.ml.aggs.frequentitemsets.EclatMapReducer.lambda$reduce$0(EclatMapReducer.java:344)\n\tat java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)\n\tat java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)\n\tat java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)\n\tat java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)\n\tat java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)\n\tat java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)\n\tat java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)\n\tat java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)\n\tat java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)\n\tat java.base/java.util.stream.ReferencePipeline.forEachOrdered(ReferencePipeline.java:601)\n\tat org.elasticsearch.ml@8.9.0-SNAPSHOT/org.elasticsearch.xpack.ml.aggs.frequentitemsets.EclatMapReducer.reduce(EclatMapReducer.java:332)\n\tat org.elasticsearch.ml@8.9.0-SNAPSHOT/org.elasticsearch.xpack.ml.aggs.frequentitemsets.EclatMapReducer.reduce(EclatMapReducer.java:69)\n\tat org.elasticsearch.ml@8.9.0-SNAPSHOT/org.elasticsearch.xpack.ml.aggs.frequentitemsets.mr.InternalItemSetMapReduceAggregation.reduce(InternalItemSetMapReduceAggregation.java:122)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.search.aggregations.InternalAggregations.reduce(InternalAggregations.java:159)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.search.aggregations.InternalAggregations.topLevelReduce(InternalAggregations.java:106)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.SearchPhaseController.reduceAggs(SearchPhaseController.java:631)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.SearchPhaseController.reducedQueryPhase(SearchPhaseController.java:594)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.QueryPhaseResultConsumer.reduce(QueryPhaseResultConsumer.java:138)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.FetchSearchPhase.innerRun(FetchSearchPhase.java:104)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.FetchSearchPhase$1.doRun(FetchSearchPhase.java:90)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:33)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:983)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)\n\tat java.base/java.lang.Thread.run(Thread.java:1623)\n"},"stack_trace":"Failed to execute phase [fetch], \n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.AbstractSearchAsyncAction.onPhaseFailure(AbstractSearchAsyncAction.java:729)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.FetchSearchPhase$1.onFailure(FetchSearchPhase.java:95)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:28)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:33)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:983)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)\n\tat java.base/java.lang.Thread.run(Thread.java:1623)\nCaused by: java.lang.IllegalStateException: already closed\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.breaker.PreallocatedCircuitBreakerService$PreallocatedCircuitBreaker.addWithoutBreaking(PreallocatedCircuitBreakerService.java:131)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.search.aggregations.AggregatorBase.addRequestCircuitBreakerBytes(AggregatorBase.java:148)\n\tat org.elasticsearch.ml@8.9.0-SNAPSHOT/org.elasticsearch.xpack.ml.aggs.frequentitemsets.mr.ItemSetMapReduceAggregator.lambda$new$0(ItemSetMapReduceAggregator.java:108)\n\tat org.elasticsearch.ml@8.9.0-SNAPSHOT/org.elasticsearch.xpack.ml.aggs.frequentitemsets.mr.DelegatingCircuitBreakerService$DelegatingCircuitBreaker.addWithoutBreaking(DelegatingCircuitBreakerService.java:92)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.BigArrays.adjustBreaker(BigArrays.java:477)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.AbstractArray.close(AbstractArray.java:28)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.IOUtils.close(IOUtils.java:71)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.IOUtils.close(IOUtils.java:87)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.IOUtils.close(IOUtils.java:63)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.Releasables.close(Releasables.java:73)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.Releasables.close(Releasables.java:41)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.BytesRefArray.close(BytesRefArray.java:117)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.IOUtils.close(IOUtils.java:71)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.IOUtils.close(IOUtils.java:87)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.IOUtils.close(IOUtils.java:63)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.Releasables.close(Releasables.java:73)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.Releasables.close(Releasables.java:41)\n\tat org.elasticsearch.ml@8.9.0-SNAPSHOT/org.elasticsearch.xpack.ml.aggs.frequentitemsets.ImmutableTransactionStore.close(ImmutableTransactionStore.java:142)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.IOUtils.close(IOUtils.java:71)\n\tat org.elasticsearch.base@8.9.0-SNAPSHOT/org.elasticsearch.core.Releasables.close(Releasables.java:33)\n\tat org.elasticsearch.ml@8.9.0-SNAPSHOT/org.elasticsearch.xpack.ml.aggs.frequentitemsets.EclatMapReducer.lambda$reduce$0(EclatMapReducer.java:344)\n\tat java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)\n\tat java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)\n\tat java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)\n\tat java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)\n\tat java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)\n\tat java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)\n\tat java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)\n\tat java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)\n\tat java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)\n\tat java.base/java.util.stream.ReferencePipeline.forEachOrdered(ReferencePipeline.java:601)\n\tat org.elasticsearch.ml@8.9.0-SNAPSHOT/org.elasticsearch.xpack.ml.aggs.frequentitemsets.EclatMapReducer.reduce(EclatMapReducer.java:332)\n\tat org.elasticsearch.ml@8.9.0-SNAPSHOT/org.elasticsearch.xpack.ml.aggs.frequentitemsets.EclatMapReducer.reduce(EclatMapReducer.java:69)\n\tat org.elasticsearch.ml@8.9.0-SNAPSHOT/org.elasticsearch.xpack.ml.aggs.frequentitemsets.mr.InternalItemSetMapReduceAggregation.reduce(InternalItemSetMapReduceAggregation.java:122)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.search.aggregations.InternalAggregations.reduce(InternalAggregations.java:159)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.search.aggregations.InternalAggregations.topLevelReduce(InternalAggregations.java:106)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.SearchPhaseController.reduceAggs(SearchPhaseController.java:631)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.SearchPhaseController.reducedQueryPhase(SearchPhaseController.java:594)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.QueryPhaseResultConsumer.reduce(QueryPhaseResultConsumer.java:138)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.FetchSearchPhase.innerRun(FetchSearchPhase.java:104)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.FetchSearchPhase$1.doRun(FetchSearchPhase.java:90)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)\n\t... 6 more\n"},"status":500}]

    at org.junit.Assert.fail(Assert.java:88)
    at org.elasticsearch.test.rest.yaml.section.DoSection.execute(DoSection.java:373)
    at org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase.executeSection(ESClientYamlSuiteTestCase.java:552)
    at org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase.test(ESClientYamlSuiteTestCase.java:524)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
    at java.lang.reflect.Method.invoke(Method.java:578)
    at com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1758)
    at com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:946)
    at com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:982)
    at com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:996)
    at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
    at org.apache.lucene.tests.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:48)
    at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
    at org.apache.lucene.tests.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:45)
    at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
    at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
    at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
    at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
    at com.carrotsearch.randomizedtesting.ThreadLeakControl.forkTimeoutingTask(ThreadLeakControl.java:843)
    at com.carrotsearch.randomizedtesting.ThreadLeakControl$3.evaluate(ThreadLeakControl.java:490)
    at com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:955)
    at com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:840)
    at com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:891)
    at com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:902)
    at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
    at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
    at org.apache.lucene.tests.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:38)
    at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
    at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
    at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
    at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
    at org.apache.lucene.tests.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:53)
    at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
    at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
    at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
    at org.apache.lucene.tests.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:47)
    at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
    at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
    at com.carrotsearch.randomizedtesting.ThreadLeakControl.lambda$forkTimeoutingTask$0(ThreadLeakControl.java:850)
    at java.lang.Thread.run(Thread.java:1623)

```
x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/aggs/frequentitemsets/mr/DelegatingCircuitBreakerService.java
}
        void disconnect() {
            wrappedBreaker = null;
        }
        @Override
        public void circuitBreak(String fieldName, long bytesNeeded) {
            if (wrappedBreaker != null) {
                wrappedBreaker.circuitBreak(fieldName, bytesNeeded);
            }
        }
        @Override
        public void addEstimateBytesAndMaybeBreak(long bytes, String label) throws CircuitBreakingException {
            if (wrappedBreaker != null) {
                addToBreakerOverwrite.accept(bytes);
            }
        }
        @Override
        public void addWithoutBreaking(long bytes) {
            if (wrappedBreaker != null) {
                addToBreakerOverwrite.accept(bytes);
            }
        }
        @Override
        public long getUsed() {
            if (wrappedBreaker != null) {
                return wrappedBreaker.getUsed();
            }
            return 0;
        }
        @Override