Open hongBry opened 6 years ago
i found the fault. i use the ‘ls’ has same elem
val query = tPosts.filter{ p =>
val a = ls.map{
l =>
p.elem1=== l._3 && p.emem2 === l._1 && p.elem3 === l._2
}
a.reduceLeft(_ || _)
}
db.run{query.result}
it will report the stackoverflowError
slick version is 3.2.1
Reported on postgres profiles.
i use reduceLeft in the filter clause, there may be a java.lang.StackOverflowError, if the Array reduced is too big(>30) in high concurrency. it will occur the StackOverflowError error.
Some stacktrace: java.lang.StackOverflowError at slick.compiler.AssignUniqueSymbols.tr$1(AssignUniqueSymbols.scala:55) at slick.compiler.AssignUniqueSymbols.$anonfun$apply$8(AssignUniqueSymbols.scala:56)