xslStyle URIResolver in combination with solr URIResolver generates 4 identical SOLR queries

Description

Including the XSL expression <xsl:copy-of select="document('solr:q=state%3Apublished&amp;rows=0')/*"/> in a XSL stylesheet generates exactly one SOLR query (as expected) as can be seen from the SOLR-logfile (/var/solr/logs/solr.log)
2020-09-02 06:40:37.262 INFO (qtp573200870-18) [ x:pdm] o.a.s.c.S.Request [pdm] webapp=/solr path=/select params={q=state:published&rows=0&version=4.5} hits=1 status=0 QTime=9

Addition of a subsequent XSL transformation through the xslStyle URIResolver <xsl:copy-of select="document('xslStyle:sidebar:solr:q=state%3Apublished&amp;rows=0')/*"/> however, generates 4 identical SOLR queries as reported in the logfile
2020-09-02 06:42:35.265 INFO (qtp573200870-23) [ x:pdm] o.a.s.c.S.Request [pdm] webapp=/solr path=/select params={q=state:published&rows=0&version=4.5} hits=1 status=0 QTime=8
2020-09-02 06:42:35.277 INFO (qtp573200870-16) [ x:pdm] o.a.s.c.S.Request [pdm] webapp=/solr path=/select params={q=state:published&rows=0&version=4.5} hits=1 status=0 QTime=5
2020-09-02 06:42:35.284 INFO (qtp573200870-43) [ x:pdm] o.a.s.c.S.Request [pdm] webapp=/solr path=/select params={q=state:published&rows=0&version=4.5} hits=1 status=0 QTime=4
2020-09-02 06:42:35.294 INFO (qtp573200870-22) [ x:pdm] o.a.s.c.S.Request [pdm] webapp=/solr path=/select params={q=state:published&rows=0&version=4.5} hits=1 status=0 QTime=4

Still, only one (transformed) output is copied (copy-of) into the final document and the 4 calls only appear in the SOLR logs. Furthermore, when the SOLR-index has a considerable number of datasets, 3 of the 4 queries apparently cannot write their responses, as can be seen from the following entries in the logfile

2020-09-02 14:35:46.728 INFO (qtp1670313965-84) [ x:pdm] o.a.s.c.S.Request [pdm] webapp=/solr path=/select params={q=:&rows=0&version=4.5} hits=59124 status=0 QTime=43
2020-09-02 14:35:46.776 INFO (qtp1670313965-87) [ x:pdm] o.a.s.c.S.Request [pdm] webapp=/solr path=/select params={q=:&rows=0&version=4.5} hits=59124 status=0 QTime=47
2020-09-02 14:35:46.826 INFO (qtp1670313965-98) [ x:pdm] o.a.s.c.S.Request [pdm] webapp=/solr path=/select params={q=:&rows=0&version=4.5} hits=59124 status=0 QTime=47
2020-09-02 14:35:46.879 INFO (qtp1670313965-101) [ x:pdm] o.a.s.c.S.Request [pdm] webapp=/solr path=/select params={q=:&rows=0&version=4.5} hits=59124 status=0 QTime=51
2020-09-02 14:35:47.134 INFO (qtp1670313965-87) [ x:pdm] o.a.s.s.HttpSolrCall Unable to write response, client closed connection or we are shutting down
org.eclipse.jetty.io.EofException: null
at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:285) ~[jetty-io-9.4.14.v20181114.jar:9.4.14.v20181114]
at org.eclipse.jetty.io.WriteFlusher.flush(WriteFlusher.java:393) ~[jetty-io-9.4.14.v20181114.jar:9.4.14.v20181114]
at org.eclipse.jetty.io.WriteFlusher.completeWrite(WriteFlusher.java:349) ~[jetty-io-9.4.14.v20181114.jar:9.4.14.v20181114]
at org.eclipse.jetty.io.ChannelEndPoint$3.run(ChannelEndPoint.java:133) ~[jetty-io-9.4.14.v20181114.jar:9.4.14.v20181114]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333) [jetty-util-9.4.14.v20181114.jar:9.4.14.v20181114]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:295) [jetty-util-9.4.14.v20181114.jar:9.4.14.v20181114]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) [jetty-util-9.4.14.v20181114.jar:9.4.14.v20181114]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) [jetty-util-9.4.14.v20181114.jar:9.4.14.v20181114]
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) [jetty-util-9.4.14.v20181114.jar:9.4.14.v20181114]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765) [jetty-util-9.4.14.v20181114.jar:9.4.14.v20181114]
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683) [jetty-util-9.4.14.v20181114.jar:9.4.14.v20181114]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.io.IOException: Connection reset by peer
at sun.nio.ch.FileDispatcherImpl.write0(Native Method) ~[?:?]
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47) ~[?:?]
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:113) ~[?:?]
at sun.nio.ch.IOUtil.write(IOUtil.java:58) ~[?:?]
at sun.nio.ch.IOUtil.write(IOUtil.java:50) ~[?:?]
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:466) ~[?:?]
at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:263) ~[jetty-io-9.4.14.v20181114.jar:9.4.14.v20181114]
... 11 more
2020-09-02 14:35:47.134 INFO (qtp1670313965-84) [ x:pdm] o.a.s.s.HttpSolrCall Unable to write response, client closed connection or we are shutting down
org.eclipse.jetty.io.EofException: null
at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:285) ~[jetty-io-9.4.14.v20181114.jar:9.4.14.v20181114]
at org.eclipse.jetty.io.WriteFlusher.flush(WriteFlusher.java:393) ~[jetty-io-9.4.14.v20181114.jar:9.4.14.v20181114]
at org.eclipse.jetty.io.WriteFlusher.completeWrite(WriteFlusher.java:349) ~[jetty-io-9.4.14.v20181114.jar:9.4.14.v20181114]
at org.eclipse.jetty.io.ChannelEndPoint$3.run(ChannelEndPoint.java:133) ~[jetty-io-9.4.14.v20181114.jar:9.4.14.v20181114]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333) [jetty-util-9.4.14.v20181114.jar:9.4.14.v20181114]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:295) [jetty-util-9.4.14.v20181114.jar:9.4.14.v20181114]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) [jetty-util-9.4.14.v20181114.jar:9.4.14.v20181114]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) [jetty-util-9.4.14.v20181114.jar:9.4.14.v20181114]
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) [jetty-util-9.4.14.v20181114.jar:9.4.14.v20181114]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765) [jetty-util-9.4.14.v20181114.jar:9.4.14.v20181114]
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683) [jetty-util-9.4.14.v20181114.jar:9.4.14.v20181114]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.io.IOException: Connection reset by peer
at sun.nio.ch.FileDispatcherImpl.write0(Native Method) ~[?:?]
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47) ~[?:?]
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:113) ~[?:?]
at sun.nio.ch.IOUtil.write(IOUtil.java:58) ~[?:?]
at sun.nio.ch.IOUtil.write(IOUtil.java:50) ~[?:?]
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:466) ~[?:?]
at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:263) ~[jetty-io-9.4.14.v20181114.jar:9.4.14.v20181114]
... 11 more
2020-09-02 14:35:47.135 INFO (qtp1670313965-98) [ x:pdm] o.a.s.s.HttpSolrCall Unable to write response, client closed connection or we are shutting down
2020-09-02 14:35:47.135 INFO (qtp1670313965-98) [ x:pdm] o.a.s.s.HttpSolrCall Unable to write response, client closed connection or we are shutting down
org.eclipse.jetty.io.EofException: null
at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:285) ~[jetty-io-9.4.14.v20181114.jar:9.4.14.v20181114]
at org.eclipse.jetty.io.WriteFlusher.flush(WriteFlusher.java:393) ~[jetty-io-9.4.14.v20181114.jar:9.4.14.v20181114]
at org.eclipse.jetty.io.WriteFlusher.completeWrite(WriteFlusher.java:349) ~[jetty-io-9.4.14.v20181114.jar:9.4.14.v20181114]
at org.eclipse.jetty.io.ChannelEndPoint$3.run(ChannelEndPoint.java:133) ~[jetty-io-9.4.14.v20181114.jar:9.4.14.v20181114]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333) [jetty-util-9.4.14.v20181114.jar:9.4.14.v20181114]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:295) [jetty-util-9.4.14.v20181114.jar:9.4.14.v20181114]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) [jetty-util-9.4.14.v20181114.jar:9.4.14.v20181114]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) [jetty-util-9.4.14.v20181114.jar:9.4.14.v20181114]
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) [jetty-util-9.4.14.v20181114.jar:9.4.14.v20181114]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765) [jetty-util-9.4.14.v20181114.jar:9.4.14.v20181114]
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683) [jetty-util-9.4.14.v20181114.jar:9.4.14.v20181114]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.io.IOException: Connection reset by peer
at sun.nio.ch.FileDispatcherImpl.write0(Native Method) ~[?:?]
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47) ~[?:?]
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:113) ~[?:?]
at sun.nio.ch.IOUtil.write(IOUtil.java:58) ~[?:?]
at sun.nio.ch.IOUtil.write(IOUtil.java:50) ~[?:?]
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:466) ~[?:?]
at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:263) ~[jetty-io-9.4.14.v20181114.jar:9.4.14.v20181114]
... 11 more

Running the same query through the CLI (get uri 'xslStyle:sidebar:solr:q=state:published' test to file solr.out) results exactly one SOLR query, as expected.

Environment

None

Assignee

Thomas Scheffler

Reporter

Kai Brandhorst

Labels

None

URL

None

External issue ID

None

Fix versions

Affects versions

Priority

Low
Configure