Skip to content

Commit

Permalink
removed separate threading for debugging purposes
Browse files Browse the repository at this point in the history
  • Loading branch information
datomo committed Dec 11, 2024
1 parent a8844a0 commit 4d33a73
Showing 1 changed file with 5 additions and 24 deletions.
29 changes: 5 additions & 24 deletions dbms/src/main/java/org/polypheny/db/routing/UiRoutingPageUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,8 @@
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.google.common.collect.ImmutableList;
import java.util.List;
import java.util.concurrent.CompletionService;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorCompletionService;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.atomic.AtomicInteger;
import lombok.extern.slf4j.Slf4j;
import org.polypheny.db.algebra.AlgNode;
Expand Down Expand Up @@ -81,25 +76,11 @@ public static void outputSingleResult( Plan plan, InformationManager queryAnalyz


public static void addPhysicalPlanPage( AlgNode optimalNode, InformationManager queryAnalyzer, long stmtIdx, boolean attachTextualPlan ) {
UiRoutingPageUtil.counter.incrementAndGet();
Future<?> future = executorService.submit( () -> {
try {
addRoutedPolyPlanPage( optimalNode, queryAnalyzer, stmtIdx, true, attachTextualPlan );
} catch ( Throwable t ) {
log.error( "Error adding routing plan", t );
} finally {
UiRoutingPageUtil.counter.decrementAndGet();
}
} );

new Thread( () -> {
try {
future.get();
} catch ( InterruptedException | ExecutionException e ) {
log.error( "Future failed: Error adding routing plan", e );
throw new GenericRuntimeException( e );
}
});
try {
addRoutedPolyPlanPage( optimalNode, queryAnalyzer, stmtIdx, true, attachTextualPlan );
} catch ( Throwable t ) {
log.error( "Error adding routing plan", t );
}
}


Expand Down

0 comments on commit 4d33a73

Please sign in to comment.