|
@@ -72,9 +72,10 @@ public class ChannelDemandMatchJob {
|
|
|
private static final long RECALL_CACHE_EXPIRE = 6 * 60 * 60;
|
|
private static final long RECALL_CACHE_EXPIRE = 6 * 60 * 60;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 需求匹配并发线程数(单个渠道内部的需求匹配)
|
|
|
|
|
|
|
+ * 需求匹配并发线程数(单个维度批次内的需求匹配)
|
|
|
*/
|
|
*/
|
|
|
- private static final int MATCH_THREAD_POOL_SIZE = 5;
|
|
|
|
|
|
|
+ @Value("${channel.demand.match.thread-pool-size:50}")
|
|
|
|
|
+ private int matchThreadPoolSize;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 匹配手段:场景已看视频(来自维度统计表,不走向量召回)
|
|
* 匹配手段:场景已看视频(来自维度统计表,不走向量召回)
|
|
@@ -298,7 +299,7 @@ public class ChannelDemandMatchJob {
|
|
|
totalFilteredCount += filteredDemands.size();
|
|
totalFilteredCount += filteredDemands.size();
|
|
|
|
|
|
|
|
// 2c. 并发匹配该批过滤后的需求,完成后释放引用进入下一维度
|
|
// 2c. 并发匹配该批过滤后的需求,完成后释放引用进入下一维度
|
|
|
- ExecutorService matchExecutor = Executors.newFixedThreadPool(MATCH_THREAD_POOL_SIZE);
|
|
|
|
|
|
|
+ ExecutorService matchExecutor = Executors.newFixedThreadPool(matchThreadPoolSize);
|
|
|
List<Future<?>> matchFutures = new ArrayList<>();
|
|
List<Future<?>> matchFutures = new ArrayList<>();
|
|
|
for (ChannelDemandMatchResult demand : filteredDemands) {
|
|
for (ChannelDemandMatchResult demand : filteredDemands) {
|
|
|
totalDemands.incrementAndGet();
|
|
totalDemands.incrementAndGet();
|