diff --git a/executor/src/main/java/org/neo4j/gds/executor/ProcedureExecutor.java b/executor/src/main/java/org/neo4j/gds/executor/ProcedureExecutor.java index 025668afb7..7bdc95138c 100644 --- a/executor/src/main/java/org/neo4j/gds/executor/ProcedureExecutor.java +++ b/executor/src/main/java/org/neo4j/gds/executor/ProcedureExecutor.java @@ -113,8 +113,8 @@ public RESULT compute( ALGO algo = newAlgorithm(graph, graphStore, config); - algo.getProgressTracker().setEstimatedResourceFootprint(memoryEstimationInBytes, config.concurrency()); - + algo.getProgressTracker().setEstimatedResourceFootprint(memoryEstimationInBytes); + algo.getProgressTracker().requestedConcurrency(config.concurrency()); ALGO_RESULT result = executeAlgorithm(builder, algo, executionContext.metrics().algorithmMetrics()); diff --git a/progress-tracking/src/main/java/org/neo4j/gds/core/utils/progress/tasks/ProgressTracker.java b/progress-tracking/src/main/java/org/neo4j/gds/core/utils/progress/tasks/ProgressTracker.java index f7f5c1f02b..43035bb6dc 100644 --- a/progress-tracking/src/main/java/org/neo4j/gds/core/utils/progress/tasks/ProgressTracker.java +++ b/progress-tracking/src/main/java/org/neo4j/gds/core/utils/progress/tasks/ProgressTracker.java @@ -28,7 +28,9 @@ public interface ProgressTracker { ProgressTracker NULL_TRACKER = new EmptyProgressTracker(); - void setEstimatedResourceFootprint(MemoryRange memoryEstimationInBytes, Concurrency concurrency); + void setEstimatedResourceFootprint(MemoryRange memoryEstimationInBytes); + + void requestedConcurrency(Concurrency concurrency); void beginSubTask(); @@ -89,7 +91,12 @@ default void logInfo(String message) { class EmptyProgressTracker implements ProgressTracker { @Override - public void setEstimatedResourceFootprint(MemoryRange memoryRangeInBytes, Concurrency concurrency) { + public void setEstimatedResourceFootprint(MemoryRange memoryRangeInBytes) { + } + + @Override + public void requestedConcurrency(Concurrency concurrency) { + } @Override diff --git a/progress-tracking/src/main/java/org/neo4j/gds/core/utils/progress/tasks/ProgressTrackerAdapter.java b/progress-tracking/src/main/java/org/neo4j/gds/core/utils/progress/tasks/ProgressTrackerAdapter.java index b94a8a5899..d091a3ce77 100644 --- a/progress-tracking/src/main/java/org/neo4j/gds/core/utils/progress/tasks/ProgressTrackerAdapter.java +++ b/progress-tracking/src/main/java/org/neo4j/gds/core/utils/progress/tasks/ProgressTrackerAdapter.java @@ -33,8 +33,13 @@ public ProgressTrackerAdapter(ProgressTracker delegate) { } @Override - public void setEstimatedResourceFootprint(MemoryRange memoryEstimationInBytes, Concurrency concurrency) { - delegate.setEstimatedResourceFootprint(memoryEstimationInBytes, concurrency); + public void setEstimatedResourceFootprint(MemoryRange memoryEstimationInBytes) { + delegate.setEstimatedResourceFootprint(memoryEstimationInBytes); + } + + @Override + public void requestedConcurrency(Concurrency concurrency) { + delegate.requestedConcurrency(concurrency); } @Override diff --git a/progress-tracking/src/main/java/org/neo4j/gds/core/utils/progress/tasks/TaskProgressTracker.java b/progress-tracking/src/main/java/org/neo4j/gds/core/utils/progress/tasks/TaskProgressTracker.java index f65729843d..86ec117301 100644 --- a/progress-tracking/src/main/java/org/neo4j/gds/core/utils/progress/tasks/TaskProgressTracker.java +++ b/progress-tracking/src/main/java/org/neo4j/gds/core/utils/progress/tasks/TaskProgressTracker.java @@ -103,9 +103,13 @@ protected TaskProgressTracker( } @Override - public void setEstimatedResourceFootprint(MemoryRange memoryRangeInBytes, Concurrency maxConcurrency) { + public void setEstimatedResourceFootprint(MemoryRange memoryRangeInBytes) { this.baseTask.setEstimatedMemoryRangeInBytes(memoryRangeInBytes); - this.baseTask.setMaxConcurrency(maxConcurrency); + } + + @Override + public void requestedConcurrency(Concurrency concurrency) { + this.baseTask.setMaxConcurrency(concurrency); } @Override