[JIRA] Created: (STS-891) Cache in HttpCacheInterceptor needs to be concurrent

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[JIRA] Created: (STS-891) Cache in HttpCacheInterceptor needs to be concurrent

JIRA jira@stripesframework.org
Cache in HttpCacheInterceptor needs to be concurrent
----------------------------------------------------

                 Key: STS-891
                 URL: http://www.stripesframework.org/jira/browse/STS-891
             Project: Stripes
          Issue Type: Bug
    Affects Versions: Release 1.5.3
            Reporter: Frederic Daoud
            Assignee: Frederic Daoud
             Fix For: Release 1.5.8, Release 1.6


In HttpCacheInterceptor, the cache needs to be a concurrent hash map. In a high-volume environment, accessing the cache can lead to race conditions and excessively high load.

--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Stripes-development mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-development
Reply | Threaded
Open this post in threaded view
|

[JIRA] Resolved: (STS-891) Cache in HttpCacheInterceptor needs to be concurrent

JIRA jira@stripesframework.org

     [ http://www.stripesframework.org/jira/browse/STS-891?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Frederic Daoud resolved STS-891.
--------------------------------

    Resolution: Fixed

Fixed in revision 1515 of 1.5.x branch, will be merged to trunk.

> Cache in HttpCacheInterceptor needs to be concurrent
> ----------------------------------------------------
>
>                 Key: STS-891
>                 URL: http://www.stripesframework.org/jira/browse/STS-891
>             Project: Stripes
>          Issue Type: Bug
>    Affects Versions: Release 1.5.3
>            Reporter: Frederic Daoud
>            Assignee: Frederic Daoud
>             Fix For: Release 1.5.8, Release 1.6
>
>
> In HttpCacheInterceptor, the cache needs to be a concurrent hash map. In a high-volume environment, accessing the cache can lead to race conditions and excessively high load.

--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Stripes-development mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-development
Reply | Threaded
Open this post in threaded view
|

[JIRA] Commented: (STS-891) Cache in HttpCacheInterceptor needs to be concurrent

JIRA jira@stripesframework.org
In reply to this post by JIRA jira@stripesframework.org

    [ http://www.stripesframework.org/jira/browse/STS-891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12874#comment-12874 ]

Remi VANKEISBELCK commented on STS-891:
---------------------------------------

Wasn't fixed (unit tests were failing).

Should be now : r1519.

> Cache in HttpCacheInterceptor needs to be concurrent
> ----------------------------------------------------
>
>                 Key: STS-891
>                 URL: http://www.stripesframework.org/jira/browse/STS-891
>             Project: Stripes
>          Issue Type: Bug
>    Affects Versions: Release 1.5.3
>            Reporter: Frederic Daoud
>            Assignee: Frederic Daoud
>             Fix For: Release 1.5.8, Release 1.6
>
>
> In HttpCacheInterceptor, the cache needs to be a concurrent hash map. In a high-volume environment, accessing the cache can lead to race conditions and excessively high load.

--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Stripes-development mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-development
Reply | Threaded
Open this post in threaded view
|

[JIRA] Commented: (STS-891) Cache in HttpCacheInterceptor needs to be concurrent

JIRA jira@stripesframework.org
In reply to this post by JIRA jira@stripesframework.org

    [ http://www.stripesframework.org/jira/browse/STS-891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12875#comment-12875 ]

Remi VANKEISBELCK commented on STS-891:
---------------------------------------

I haven't investigated deeply but the reason is you can't put null in a concurrent hashmap. Not sure it modifies behavior : I guess that nulls were put into the map before, maybe there's a reason... I let you double check Freddy...

> Cache in HttpCacheInterceptor needs to be concurrent
> ----------------------------------------------------
>
>                 Key: STS-891
>                 URL: http://www.stripesframework.org/jira/browse/STS-891
>             Project: Stripes
>          Issue Type: Bug
>    Affects Versions: Release 1.5.3
>            Reporter: Frederic Daoud
>            Assignee: Frederic Daoud
>             Fix For: Release 1.5.8, Release 1.6
>
>
> In HttpCacheInterceptor, the cache needs to be a concurrent hash map. In a high-volume environment, accessing the cache can lead to race conditions and excessively high load.

--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Stripes-development mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-development
Reply | Threaded
Open this post in threaded view
|

[JIRA] Commented: (STS-891) Cache in HttpCacheInterceptor needs to be concurrent

JIRA jira@stripesframework.org
In reply to this post by JIRA jira@stripesframework.org

    [ http://www.stripesframework.org/jira/browse/STS-891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12876#comment-12876 ]

Frederic Daoud commented on STS-891:
------------------------------------

@Remi, you are correct. Can't put null in ConcurrentHashMap. Our workaround was to define an object to represent a null:

    private static HttpCache nullCache = new HttpCache() {
                public Class<? extends Annotation> annotationType() {return null;}
                public int expires() {
                                return 0;
                }
                public boolean allow() {
                        return false;
                }
    };

So if the value wanting to be put in the map is null, we put nullCache instead. Conversely, if we get nullCache back from the map, we return null.


> Cache in HttpCacheInterceptor needs to be concurrent
> ----------------------------------------------------
>
>                 Key: STS-891
>                 URL: http://www.stripesframework.org/jira/browse/STS-891
>             Project: Stripes
>          Issue Type: Bug
>    Affects Versions: Release 1.5.3
>            Reporter: Frederic Daoud
>            Assignee: Frederic Daoud
>             Fix For: Release 1.5.8, Release 1.6
>
>
> In HttpCacheInterceptor, the cache needs to be a concurrent hash map. In a high-volume environment, accessing the cache can lead to race conditions and excessively high load.

--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Stripes-development mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-development
Reply | Threaded
Open this post in threaded view
|

[JIRA] Commented: (STS-891) Cache in HttpCacheInterceptor needs to be concurrent

JIRA jira@stripesframework.org
In reply to this post by JIRA jira@stripesframework.org

    [ http://www.stripesframework.org/jira/browse/STS-891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12877#comment-12877 ]

Remi VANKEISBELCK commented on STS-891:
---------------------------------------

Just had a closer look. Yeah your solution avoids checking everytime, which is the whole point of the cache.

Committed that : r1520.



> Cache in HttpCacheInterceptor needs to be concurrent
> ----------------------------------------------------
>
>                 Key: STS-891
>                 URL: http://www.stripesframework.org/jira/browse/STS-891
>             Project: Stripes
>          Issue Type: Bug
>    Affects Versions: Release 1.5.3
>            Reporter: Frederic Daoud
>            Assignee: Frederic Daoud
>             Fix For: Release 1.5.8, Release 1.6
>
>
> In HttpCacheInterceptor, the cache needs to be a concurrent hash map. In a high-volume environment, accessing the cache can lead to race conditions and excessively high load.

--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Stripes-development mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-development