File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed
server/src/main/java/org/elasticsearch/index/engine Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -317,7 +317,7 @@ private boolean enqueueMergeTaskExecution() {
317317 // is also drained, so any queued merge tasks are also forgotten.
318318 break ;
319319 }
320- try {
320+ try ( var ignored = smallestMergeTaskWithReleasableBudget ) {
321321 MergeTask smallestMergeTask = smallestMergeTaskWithReleasableBudget .element ();
322322 // let the task's scheduler decide if it can actually run the merge task now
323323 ThreadPoolMergeScheduler .Schedule schedule = smallestMergeTask .schedule ();
@@ -335,10 +335,6 @@ private boolean enqueueMergeTaskExecution() {
335335 // task is re-enqueued and re-took before the budget hold-up here is released upon the next
336336 // {@link PriorityBlockingQueueWithBudget#updateBudget} invocation.
337337 }
338- } finally {
339- // signals that the merge task is not in use anymore, so the budget (i.e. disk space) it's holding so far won't be
340- // deducted from the total available
341- smallestMergeTaskWithReleasableBudget .close ();
342338 }
343339 }
344340 });
You can’t perform that action at this time.
0 commit comments