dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #26161
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12962: Analytics tables, fixed issue with parallel insert
------------------------------------------------------------
revno: 12962
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-11-18 15:39:37 +0100
message:
Analytics tables, fixed issue with parallel insert
modified:
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/DefaultAnalyticsTableService.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/DefaultAnalyticsTableService.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/DefaultAnalyticsTableService.java 2013-11-10 22:43:59 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/DefaultAnalyticsTableService.java 2013-11-18 14:39:37 +0000
@@ -182,6 +182,10 @@
private void populateTables( List<AnalyticsTable> tables )
{
+ int taskNo = Math.min( getProcessNo(), tables.size() );
+
+ log.info( "Populate table task number: " + taskNo );
+
ConcurrentLinkedQueue<AnalyticsTable> tableQ = new ConcurrentLinkedQueue<AnalyticsTable>( tables );
List<Future<?>> futures = new ArrayList<Future<?>>();