Skip to content

Commit e5887f5

Browse files
committed
WIP
1 parent 1cc8a1f commit e5887f5

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

.github/workflows/test-xetabase-workflow.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ jobs:
9898
run: |
9999
cd opencga-enterprise
100100
ln -s ../opencga opencga-home
101-
./build.sh --test --test-level runShortTests --prepare-branches --test-save-reports --task ${{ inputs.task }} --storage-hadoop ${{ vars.HADOOP_FLAVOUR }} --prepare-hadoop
101+
ls -la build.sh
102+
./build.sh --test --test-level runShortTests --prepare-branches --test-save-reports --task ${{ inputs.task }} --storage-hadoop ${{ vars.HADOOP_FLAVOUR }} --prepare-hadoop --verbose
102103
env:
103104
THIRDPARTY_READ_TOKEN: ${{ secrets.THIRDPARTY_READ_TOKEN }}
104105
- name: Upload reports results to Github

commons-lib/src/main/java/org/opencb/commons/run/ParallelTaskRunner.java

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,10 @@ public ParallelTaskRunner.Config build() {
182182
if (capacity < 0) {
183183
capacity = numTasks * 2;
184184
}
185+
if (sorted && numTasks == 1) {
186+
logger.debug("Sorted ParallelTaskRunner with a single task. Setting sorted to false.");
187+
sorted = false;
188+
}
185189
return new ParallelTaskRunner.Config(numTasks, batchSize, capacity, abortOnFail, sorted, readQueuePutTimeoutSeconds);
186190
}
187191
}
@@ -802,16 +806,17 @@ public Void call() throws InterruptedException {
802806
}
803807
}
804808
} else if (writeBlockingQueueFuture != null) {
805-
status = TaskRunnableStatus.WRITING_BATCH_TO_QUEUE;
806809
// Sorted PTR should not have to drain!
807-
CompletableFuture<Batch<O>> future = new CompletableFuture<>();
808-
future.complete(new Batch<O>(batchResult, batch.position + 1));
809-
while (!writeBlockingQueueFuture.offer(future, TIMEOUT_CHECK, TimeUnit.SECONDS)) {
810-
if (isAbortPending()) {
811-
logger.warn("Abort task thread on fail");
812-
break;
813-
}
814-
}
810+
throw new IllegalStateException("Sorted ParallelTaskRunner should not have to drain!");
811+
// status = TaskRunnableStatus.WRITING_BATCH_TO_QUEUE;
812+
// CompletableFuture<Batch<O>> future = new CompletableFuture<>();
813+
// future.complete(new Batch<O>(batchResult, batch.position + 1));
814+
// while (!writeBlockingQueueFuture.offer(future, TIMEOUT_CHECK, TimeUnit.SECONDS)) {
815+
// if (isAbortPending()) {
816+
// logger.warn("Abort task thread on fail");
817+
// break;
818+
// }
819+
// }
815820
}
816821
}
817822
} catch (Error e) {

0 commit comments

Comments
 (0)