[GitHub] [activemq-artemis] wy96f commented on issue #2843: ARTEMIS-2496 Revert catch up with zero-copy, as it's causing issues i…

2019-09-19 Thread GitBox
wy96f commented on issue #2843: ARTEMIS-2496 Revert catch up with zero-copy, as 
it's causing issues i…
URL: https://github.com/apache/activemq-artemis/pull/2843#issuecomment-533388136
 
 
   > @wy96f I've just run a naive test replacing FileRegion with ChunkedNioFile 
and it should work OOTB...but seems that netty is not reading data from it...I 
need to dig better into it
   
   @franz1981
   I just notice `ChunkedWriteHandler` needs to be added in pipeline by using 
`ChunkedFile`, 
https://github.com/netty/netty/blob/ff7a9fa091a8bf2e10020f83fc4df1c44098/example/src/main/java/io/netty/example/file/FileServer.java#L77
   It was my bad i missed this before revert. When using `ChunkedFile`(in the 
ssl case), exception would be thrown, 
https://github.com/netty/netty/blob/ff7a9fa091a8bf2e10020f83fc4df1c44098/transport/src/main/java/io/netty/channel/nio/AbstractNioByteChannel.java#L245


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [activemq-artemis] wy96f commented on issue #2843: ARTEMIS-2496 Revert catch up with zero-copy, as it's causing issues i…

2019-09-19 Thread GitBox
wy96f commented on issue #2843: ARTEMIS-2496 Revert catch up with zero-copy, as 
it's causing issues i…
URL: https://github.com/apache/activemq-artemis/pull/2843#issuecomment-533051423
 
 
   
   > Another thing I've noticed: before the revert, `ChunkedFile` wasn't 
working for me...do we have tests to verify it?
   
   @franz1981 There is no test. I copied the code 
https://github.com/netty/netty/blob/ff7a9fa091a8bf2e10020f83fc4df1c44098/example/src/main/java/io/netty/example/file/FileServerHandler.java#L52
   
   `ChunkedFile` will read file into bytebuf which would then be written into 
socket channel, 
https://github.com/netty/netty/blob/ff7a9fa091a8bf2e10020f83fc4df1c44098/handler/src/main/java/io/netty/handler/stream/ChunkedWriteHandler.java#L242
   It should work as the operations are general. What problem did you encounter 
with `ChunkedFile`?
   


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services