From: Ron V. d. B. <ron...@ka...> - 2011-01-31 10:49:05
|
Hi all, Is there a length limit on sequences eXist can construct? For both eXist-1.4.x and eXist-trunk, I notice a stack overflow error when the length of a constructed sequence grows too large. For example, a query like: let $a := concat('(', string-join( for $i in 1 to 1000 return concat('"',$i,'"') , ',') , ')') return util:eval($a) This logs following error when run in the Java Client (eXist-trunk): 2011-01-31 11:31:38,864 [eXistThread-25] DEBUG (RpcConnection.java [handleException]:113) - java.lang.StackOverflowError at java.util.ArrayList.get(ArrayList.java:322) at java.util.AbstractList$Itr.next(AbstractList.java:345) at org.exist.xquery.PathExpr.getDependencies(PathExpr.java:392) at org.exist.xquery.PathExpr.getDependencies(PathExpr.java:393) at org.exist.xquery.PathExpr.getDependencies(PathExpr.java:393) at org.exist.xquery.PathExpr.getDependencies(PathExpr.java:393) at org.exist.xquery.PathExpr.getDependencies(PathExpr.java:393) at org.exist.xquery.PathExpr.getDependencies(PathExpr.java:393) at org.exist.xquery.PathExpr.eval(PathExpr.java:214) at org.exist.xquery.SequenceConstructor.eval(SequenceConstructor.java:81) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:59) ... Some observations: -the size limit approximates 1000 items, though it differs between 1.4.x (error from 936 items) and trunk (error from 924 items). I'm not too sure, however, if there are small differences between XQuery runs (so maybe it's memory/system -related?) -the error seems to be triggered by the number of items in the sequence, rather than their individual length: no difference if the sequence items are longer or shorter strings -the error seems limited to sequence construction, as eXist clearly can handle larger sequences that have been computed (through node retrieval, e.g.) Kind regards, Ron -- Ron Van den Branden Wetenschappelijk attaché / Senior Researcher Centrum voor Teksteditie en Bronnenstudie - CTB (KANTL) Centre for Scholarly Editing and Document Studies Koninklijke Academie voor Nederlandse Taal- en Letterkunde Royal Academy of Dutch Language and Literature Koningstraat 18 / b-9000 Gent / Belgium tel: +32 9 265 93 51 / fax: +32 9 265 93 49 E-mail : ron...@ka... www.kantl.be/ctb |