2014-12-07 7:45 GMT+03:00 Konstantin Kolinko <knst.koli...@gmail.com>:
> 2014-07-29 0:42 GMT+04:00  <ma...@apache.org>:
>> Author: markt
>> Date: Mon Jul 28 20:42:46 2014
>> New Revision: 1614165
>>
>> URL: http://svn.apache.org/r1614165
>> Log:
>> Correct the label in the list of sessions by idle time for the bin that 
>> represents the idle time immediately below the maximum permitted idle time 
>> when using the expire command of the Manager application.
>>
>> Modified:
>>     tomcat/tc7.0.x/trunk/   (props changed)
>>     tomcat/tc7.0.x/trunk/java/org/apache/catalina/manager/ManagerServlet.java
>>     tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
>>
>> Propchange: tomcat/tc7.0.x/trunk/
>> ------------------------------------------------------------------------------
>>   Merged /tomcat/trunk:r1614163
>>
>> Modified: 
>> tomcat/tc7.0.x/trunk/java/org/apache/catalina/manager/ManagerServlet.java
>> URL: 
>> http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/manager/ManagerServlet.java?rev=1614165&r1=1614164&r2=1614165&view=diff
>> ==============================================================================
>> --- 
>> tomcat/tc7.0.x/trunk/java/org/apache/catalina/manager/ManagerServlet.java 
>> (original)
>> +++ 
>> tomcat/tc7.0.x/trunk/java/org/apache/catalina/manager/ManagerServlet.java 
>> Mon Jul 28 20:42:46 2014
>> @@ -1194,18 +1194,13 @@ public class ManagerServlet extends Http
>>                  writer.println(smClient.getString(
>>                          "managerServlet.sessiontimeout",
>>                          "<" + histoInterval, "" + timeout[0]));
>> -            for (int i = 1; i < maxCount-1; i++) {
>> +            for (int i = 1; i < maxCount; i++) {
>>                  if (timeout[i] > 0)
>>                      writer.println(smClient.getString(
>>                              "managerServlet.sessiontimeout",
>>                              "" + (i)*histoInterval + " - <" + 
>> (i+1)*histoInterval,
>>                              "" + timeout[i]));
>>              }
>> -            if (timeout[maxCount-1] > 0)
>> -                writer.println(smClient.getString(
>> -                        "managerServlet.sessiontimeout",
>> -                        ">=" + maxCount*histoInterval,
>> -                        "" + timeout[maxCount-1]));
>
> Actually I think that the above part of this change is wrong.
>
> The only change that was needed was to replace
>
>                            ">=" + maxCount*histoInterval,
> with
>                            ">=" + (maxCount-1)*histoInterval,
>
>>              if (notimeout > 0)
>>                  writer.println(smClient.getString(
>>                          "managerServlet.sessiontimeout.unlimited",
>> @@ -1213,7 +1208,7 @@ public class ManagerServlet extends Http
>>              if (idle >= 0)
>>                  writer.println(smClient.getString(
>>                          "managerServlet.sessiontimeout.expired",
>> -                        "" + idle,"" + expired));
>> +                        ">" + idle,"" + expired));
>>          } catch (Throwable t) {
>>              ExceptionUtils.handleThrowable(t);
>>              log("ManagerServlet.sessions[" + displayPath + "]", t);
>>
>> Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
>> URL: 
>> http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1614165&r1=1614164&r2=1614165&view=diff
>> ==============================================================================
>> --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
>> +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Mon Jul 28 20:42:46 2014
>> @@ -56,6 +56,15 @@
>>    issues to not "pop up" wrt. others).
>>  -->
>>  <section name="Tomcat 7.0.56 (violetagg)">
>> +  <subsection name="Web applications">
>> +    <changelog>
>> +      <fix>
>> +        Correct the label in the list of sessions by idle time for the bin 
>> that
>> +        represents the idle time immediately below the maximum permitted 
>> idle
>> +        time when using the expire command of the Manager application. 
>> (markt)
>> +      </fix>
>> +    </changelog>
>> +  </subsection>
>>  </section>
>>  <section name="Tomcat 7.0.55 (violetagg)" rtext="released 2014-07-27">
>>    <subsection name="Catalina">
>
>
> Though the only way to see the difference is when the background
> thread is stuck and no longer processes expirations. If there is a
> session that is idle for 40 minutes then it will be counted in the
> last bucket:
>
>                 else if (time >= maxCount)
>                     timeout[maxCount-1]++;
>
> The label for its counter shall be ">=29", not "29 - <30".
>
> Example to reproduce this issue:
> Configure examples webapp with the following in its web.xml
>     <session-config>
>         <session-timeout>2</session-timeout>
>     </session-config>
>
> and the following in its META-INF/context.xml:
> <Context backgroundProcessorDelay="10"/>
>
> Actually it would be better to use a separate counter for such overly
> idle sessions, to be able to distinct them from those that have time
> between 29 and 30.

Filed as BZ 57323, fixed by r1643656.

Best regards,
Konstantin Kolinko

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

Reply via email to