dongpodu commented on issue #2244: URL: https://github.com/apache/incubator-hugegraph/issues/2244#issuecomment-1672717414
定位到原因了:cassandraSessionPool会为每个线程创建个session,如果线程已经绑定了session,是不会再创建新的session的。但问题就出在我是在parallelStream情况下使用session,parallelStream底层使用的是forkJoinPool线程池,这个线程池里的线程不是创建好后就一直存在的,线程会过几分钟回收掉,等提交新任务后,会重新创建线程。这样就会导致session随着forkJoinPool里线程新建而新建,但线程死掉后又不会被回收,因为cassandraSessionPool的属性Map<Long, BackendSession> sessions会记录每次创建的session,session也没机会被close掉。 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
