From 43856ba590e2363fbdd194fac976f1a7d913d3c7 Mon Sep 17 00:00:00 2001 From: "chris.ditcher" Date: Tue, 1 Aug 2023 13:46:50 -0700 Subject: [PATCH 1/3] Updated to v1.8.43 --- api/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/pom.xml b/api/pom.xml index 5156d41b..aa0cb4e3 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -6,7 +6,7 @@ ca.bc.gov.educ educ-grad-student-api - 1.8.42 + 1.8.43 educ-grad-student-api Student Demographics API for GRAD team From 6e217c4959bde2b0560107c45e0dafed98762634 Mon Sep 17 00:00:00 2001 From: "chris.ditcher" Date: Thu, 3 Aug 2023 13:55:55 -0700 Subject: [PATCH 2/3] Updated to v1.8.44 --- api/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/pom.xml b/api/pom.xml index aa0cb4e3..411f6715 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -6,7 +6,7 @@ ca.bc.gov.educ educ-grad-student-api - 1.8.43 + 1.8.44 educ-grad-student-api Student Demographics API for GRAD team From a729bcfa6dea2fa50d84093edde454ca3958299e Mon Sep 17 00:00:00 2001 From: Jinil Sung Date: Mon, 21 Aug 2023 12:05:33 -0700 Subject: [PATCH 3/3] GRAD2-2299: removed the multithread runnings as many as the number of pages to avoid db connection error. GRAD2-2299: removed the multithread runnings as many as the number of pages to avoid db connection error. --- .../api/gradstudent/service/GradStudentReportService.java | 6 +++--- .../api/gradstudent/service/GraduationStatusService.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/api/src/main/java/ca/bc/gov/educ/api/gradstudent/service/GradStudentReportService.java b/api/src/main/java/ca/bc/gov/educ/api/gradstudent/service/GradStudentReportService.java index e960ff0a..6ea9278e 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/gradstudent/service/GradStudentReportService.java +++ b/api/src/main/java/ca/bc/gov/educ/api/gradstudent/service/GradStudentReportService.java @@ -99,17 +99,17 @@ private List createAndExecuteReportGradStudentDataTasks(S tasks.add(pageTask); } - processReportGradStudentDataTasksAsync(tasks, result, totalNumberOfPages); + processReportGradStudentDataTasksAsync(tasks, result); } logger.debug("Completed in {} sec, total objects acquired {}", (System.currentTimeMillis() - startTime) / 1000, result.size()); return result; } @Generated - private void processReportGradStudentDataTasksAsync(List> tasks, List result, int numberOfThreads) { + private void processReportGradStudentDataTasksAsync(List> tasks, List result) { if(tasks.isEmpty()) return; List> executionResult; - ExecutorService executorService = Executors.newFixedThreadPool(numberOfThreads); + ExecutorService executorService = Executors.newWorkStealingPool(); try { executionResult = executorService.invokeAll(tasks); for (Future f : executionResult) { diff --git a/api/src/main/java/ca/bc/gov/educ/api/gradstudent/service/GraduationStatusService.java b/api/src/main/java/ca/bc/gov/educ/api/gradstudent/service/GraduationStatusService.java index 786b4141..efe5567a 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/gradstudent/service/GraduationStatusService.java +++ b/api/src/main/java/ca/bc/gov/educ/api/gradstudent/service/GraduationStatusService.java @@ -1022,16 +1022,16 @@ private List processStudentDataList(Page studentGuids) { tasks.add(pageTask); } - processUUIDDataTasksAsync(tasks, result, totalNumberOfPages); + processUUIDDataTasksAsync(tasks, result); } logger.debug("Completed in {} sec, total objects aquared {}", (System.currentTimeMillis() - startTime) / 1000, result.size()); return result; } - private void processUUIDDataTasksAsync(List> tasks, List result, int totalNumberOfPages) { + private void processUUIDDataTasksAsync(List> tasks, List result) { if(tasks.isEmpty()) return; List> executionResult; - ExecutorService executorService = Executors.newFixedThreadPool(totalNumberOfPages); + ExecutorService executorService = Executors.newWorkStealingPool(); try { executionResult = executorService.invokeAll(tasks); for (Future f : executionResult) {