Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rdbms-sink branch: cancel SQL query when HTTP client disconnects. #32

Open
abyrd opened this issue Aug 9, 2017 · 0 comments
Open

rdbms-sink branch: cancel SQL query when HTTP client disconnects. #32

abyrd opened this issue Aug 9, 2017 · 0 comments

Comments

@abyrd
Copy link
Member

abyrd commented Aug 9, 2017

Currently the SQL transaction continues processing after the HTTP client has cancelled its request. It will eventually fail like this:

10:37:39.659 [Grizzly-worker(3)] INFO  c.conveyal.osmlib.PostgresOSMSource - Begin node iteration
Exception in thread "Thread-2" java.lang.RuntimeException: java.io.IOException: Broken pipe
        at com.conveyal.osmlib.PBFOutput.writeOneBlob(PBFOutput.java:116)
        at com.conveyal.osmlib.PBFOutput.run(PBFOutput.java:308)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: Broken pipe
        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:93)
        at sun.nio.ch.IOUtil.write(IOUtil.java:51)
        at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
        at org.glassfish.grizzly.nio.transport.TCPNIOUtils.flushByteBuffer(TCPNIOUtils.java:149)
        at org.glassfish.grizzly.nio.transport.TCPNIOUtils.writeCompositeBuffer(TCPNIOUtils.java:87)
        at org.glassfish.grizzly.nio.transport.TCPNIOAsyncQueueWriter.write0(TCPNIOAsyncQueueWriter.java:112)
        at org.glassfish.grizzly.nio.transport.TCPNIOAsyncQueueWriter.write0(TCPNIOAsyncQueueWriter.java:91)
        at org.glassfish.grizzly.nio.AbstractNIOAsyncQueueWriter.write(AbstractNIOAsyncQueueWriter.java:261)
        at org.glassfish.grizzly.nio.AbstractNIOAsyncQueueWriter.write(AbstractNIOAsyncQueueWriter.java:170)
        at org.glassfish.grizzly.nio.AbstractNIOAsyncQueueWriter.write(AbstractNIOAsyncQueueWriter.java:70)
        at org.glassfish.grizzly.nio.transport.TCPNIOTransportFilter.handleWrite(TCPNIOTransportFilter.java:126)
        at org.glassfish.grizzly.filterchain.TransportFilter.handleWrite(TransportFilter.java:191)
        at org.glassfish.grizzly.filterchain.ExecutorResolver$8.execute(ExecutorResolver.java:111)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
        at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
        at org.glassfish.grizzly.filterchain.FilterChainContext.write(FilterChainContext.java:848)
        at org.glassfish.grizzly.filterchain.FilterChainContext.write(FilterChainContext.java:817)
        at org.glassfish.grizzly.http.io.OutputBuffer.flushBuffer(OutputBuffer.java:1024)
        at org.glassfish.grizzly.http.io.OutputBuffer.write(OutputBuffer.java:680)
        at org.glassfish.grizzly.http.io.OutputBuffer.write(OutputBuffer.java:542)
        at org.glassfish.grizzly.http.server.NIOOutputStreamImpl.write(NIOOutputStreamImpl.java:75)
        at com.conveyal.osmlib.PBFOutput.writeOneBlob(PBFOutput.java:114)
        ... 2 more
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant