tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <rainer.j...@kippdata.de>
Subject Re: svn commit: r1340215 - /tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
Date Sat, 19 May 2012 16:06:29 GMT
Hi Filip,

On 18.05.2012 21:23, fhanik@apache.org wrote:
> Author: fhanik
> Date: Fri May 18 19:23:12 2012
> New Revision: 1340215
>
> URL: http://svn.apache.org/viewvc?rev=1340215&view=rev
> Log:
> https://issues.apache.org/bugzilla/show_bug.cgi?id=52858
> https://issues.apache.org/bugzilla/show_bug.cgi?id=53138
> Fix broken NIO sendfile download
> Fix high CPU usage due to registered OP_READ for sendfile processes
>
>
> Modified:
>      tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
>
> Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
> URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1340215&r1=1340214&r2=1340215&view=diff
> ==============================================================================
> --- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
> +++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Fri May 18 19:23:12
2012
> @@ -1278,9 +1278,13 @@ public class NioEndpoint extends Abstrac
>
>           public boolean processSendfile(SelectionKey sk, KeyAttachment attachment, boolean
reg, boolean event) {
>               NioChannel sc = null;
> +            if (log.isTraceEnabled()) {
> +                log.trace("["+new java.sql.Date(System.currentTimeMillis()).toGMTString()+"]
Processing send file. ["+sk+"] ");
> +            }

Was that intentional? I'd say the timestamp should be provided by the 
log framework and not by java.sql.Date. But maybe the whole message is 
just a leftover from debugging the issue.

The same for the TC 7 backport.

>               try {
>                   unreg(sk, attachment, sk.readyOps());
>                   SendfileData sd = attachment.getSendfileData();
> +                //setup the file channel
>                   if ( sd.fchannel == null ) {
>                       File f = new File(sd.fileName);
>                       if ( !f.exists() ) {

...

Regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message