当前位置: 首页 > news >正文

堆栈深度超过限制

报错:Cause: com.kingbase8.util.KSQLException: 错误: 堆栈深度超过限制 Hint: 在确定了平台的堆栈深度限制是足够大后,增加配置参数 "max_stack_depth"的值(当前值为2048kB).; 错误: 堆栈深度超过限制 Hint: 在确定了平台的堆栈深度限制是足够大后,增加配置参数 "max_stack_depth"的值(当前值为2048kB).; nested exception is com.kingbase8.util.KSQLException: 错误: 堆栈深度超过限制 Hint: 在确定了平台的堆栈深度限制是足够大后,增加配置参数 "max_stack_depth"的值(当前值为2048kB).]

经过以下改进仍没能解决:

        List<String> sampleInfoIds = sampleInfoList.parallelStream().map(BaseEntity::getId).collect(Collectors.toList());//sampleInfoIds过大List<String> subList1 = sampleInfoIds.subList(0, sampleInfoIds.size() / 2);List<String> subList2 = sampleInfoIds.subList(sampleInfoIds.size() / 2, sampleInfoIds.size()-1);List<SampleInfoDTO> sampleInfoDTOList = sampleInfoMapper.getSampleInfoDTOByIds(subList1);List<SampleInfoDTO> sampleInfoDTOList1 =sampleInfoMapper.getSampleInfoDTOByIds(subList2);sampleInfoDTOList.addAll(sampleInfoDTOList1);
  List<String> sampleInfoIds = sampleInfoList.parallelStream().map(BaseEntity::getId).collect(Collectors.toList());int batch=7000;int c=(int) Math.ceil((sampleInfoIds.size()*1.0)/batch);List<SampleInfoDTO> sampleInfoDTOList=new ArrayList<>();List<CompletableFuture> completableFutures=new ArrayList<>();for (int i=0;i<c;i++){int fromIndex=i*batch;int endIndex=(i+1)*batch-1;List<String> ids=sampleInfoIds.subList(fromIndex,Math.min(endIndex, sampleInfoIds.size()-1));CompletableFuture<List<SampleInfoDTO>> future = CompletableFuture.supplyAsync(() -> {return sampleInfoMapper.getSampleInfoDTOByIds(ids);}, executor);completableFutures.add(future);}CompletableFuture.allOf(completableFutures.toArray(new CompletableFuture[0])).join();for (CompletableFuture future : completableFutures) {try {sampleInfoDTOList.addAll((List<SampleInfoDTO>)  future.get());} catch (InterruptedException e) {throw new RuntimeException(e);} catch (ExecutionException e) {throw new RuntimeException(e);}}
http://www.lryc.cn/news/148767.html

相关文章:

  • Linux ptrace系统调用
  • CSDN每日一练 |『贝博士发奖金』『Longest Continuous Increasing Subsequence』『最小差值』2023-09-01
  • 二维数组创建方式比较
  • 安达发|富士康科技集团利用自动排程APS软件打造智慧工厂
  • 云计算在大数据分析中的应用与优势
  • linux————ELK(日志收集系统集群)
  • Leetcode213 打劫家舍2
  • Redis全局命令
  • Xml转json
  • Spring框架知识点汇总
  • JavaScript Web APIs - 06 正则表达式
  • Python入门教程 | Python3 字符串
  • Playwright for Python:安装及初步使用
  • Ubuntu 20.04.5 怎么安装微信
  • HummerRisk V1.4.0发布
  • C语言每日一练----Day(12)
  • 【Tkinter系列11/15】小部件 (Text)
  • 通过「内网穿透」技术,实现出差期间远程访问企业局域网中的象过河ERP系统
  • ChatGPT和大型语言模型(LLM)是什么关系?
  • list(介绍与实现)
  • Centos7 使用docker安装oracle数据库(超详细)
  • 昨天面试的时候被提问到的问题集合(答案)
  • PYTHON用户流失数据挖掘:建立逻辑回归、XGBOOST、随机森林、决策树、支持向量机、朴素贝叶斯和KMEANS聚类用户画像...
  • 详解IP协议
  • Stream流式编程用例
  • 【Pytorch笔记】1. tensor的创建
  • Maven 基础之安装和命令行使用
  • 运动耳机需要具备哪些功能、挂耳式运动蓝牙耳机推荐
  • 【MCU】SD NAND芯片之国产新选择
  • java 多线程