Skip to content

Commit

Permalink
Update peak memory reservations when revocable memory is updated
Browse files Browse the repository at this point in the history
  • Loading branch information
sopel39 committed Mar 12, 2019
1 parent e4d97d1 commit afaf285
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ public LocalMemoryContext localSystemMemoryContext()
// caller shouldn't close this context as it's managed by the OperatorContext
public LocalMemoryContext localRevocableMemoryContext()
{
return new InternalLocalMemoryContext(operatorMemoryContext.localRevocableMemoryContext(), revocableMemoryFuture, () -> {}, false);
return new InternalLocalMemoryContext(operatorMemoryContext.localRevocableMemoryContext(), revocableMemoryFuture, this::updatePeakMemoryReservations, false);
}

// caller shouldn't close this context as it's managed by the OperatorContext
Expand All @@ -278,7 +278,7 @@ public AggregatedMemoryContext aggregateSystemMemoryContext()
// caller shouldn't close this context as it's managed by the OperatorContext
public AggregatedMemoryContext aggregateRevocableMemoryContext()
{
return new InternalAggregatedMemoryContext(operatorMemoryContext.aggregateRevocableMemoryContext(), memoryFuture, () -> {}, false);
return new InternalAggregatedMemoryContext(operatorMemoryContext.aggregateRevocableMemoryContext(), memoryFuture, this::updatePeakMemoryReservations, false);
}

// caller should close this context as it's a new context
Expand Down

0 comments on commit afaf285

Please sign in to comment.