You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Andera Del Bene (JIRA)" <ji...@apache.org> on 2011/07/07 13:22:16 UTC

[jira] [Commented] (WICKET-3876) Improve synchronization in AsynchronousDataStore buffer structure

    [ https://issues.apache.org/jira/browse/WICKET-3876?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13061213#comment-13061213 ] 

Andera Del Bene commented on WICKET-3876:
-----------------------------------------

The line of code which throws the exception (AsynchronousDataStore.java:192) is relative to snapshot code o is exactly from RC5.1 version?

Anyway, I've implemented a version AsynchronousDataStore which makes extensive use of java.util.concurrent.ThreadPoolExecutor class to coordinate saving thread and queue. Using ThreadPoolExecutor you can delegate it synchronization's issues (it's a Java 5 class).
The code is much more simple and I've successfully tested id with DiskDataStoreTest. I've called it AsyncDataStore in order to easily switch between the current AsynchronousDataStore and my new class.

Can you give my class a chance :-)?

> Improve synchronization in AsynchronousDataStore buffer structure
> -----------------------------------------------------------------
>
>                 Key: WICKET-3876
>                 URL: https://issues.apache.org/jira/browse/WICKET-3876
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 1.5-RC5.1
>            Reporter: Martin Grigorov
>         Attachments: AsyncDataStore.java
>
>
> On heavy load we saw the following exception in the logs:
> java.lang.NullPointerException
>         org.apache.wicket.pageStore.AsynchronousDataStore.removeData(AsynchronousDataStore.java:192)
>         org.apache.wicket.pageStore.DefaultPageStore.removePageData(DefaultPageStore.java:104)
>         org.apache.wicket.pageStore.DefaultPageStore.unbind(DefaultPageStore.java:149)
>         org.apache.wicket.page.PageStoreManager.sessionExpired(PageStoreManager.java:407)
>         org.apache.wicket.Application.sessionUnbound(Application.java:474)
>         org.apache.wicket.protocol.http.WebApplication.sessionUnbound(WebApplication.java:456)
>         org.apache.wicket.session.HttpSessionStore$SessionBindingListener.valueUnbound(HttpSessionStore.java:415)
>         org.apache.catalina.session.StandardSession.removeAttributeInternal(StandardSession.java:1788)
>         org.apache.catalina.session.StandardSession.expire(StandardSession.java:866)
>         org.apache.catalina.session.StandardSession.expire(StandardSession.java:740)
>         org.apache.catalina.session.StandardSession.invalidate(StandardSession.java:1253)
>         org.apache.catalina.session.StandardSessionFacade.invalidate(StandardSessionFacade.java:186)
>         org.apache.wicket.session.HttpSessionStore.invalidate(HttpSessionStore.java:177)
>         org.apache.wicket.Session.destroy(Session.java:492)
>         org.apache.wicket.Session.invalidateNow(Session.java:504)
>         org.apache.wicket.Session.detach(Session.java:645)
>         org.apache.wicket.request.cycle.RequestCycle.onDetach(RequestCycle.java:543)
>         org.apache.wicket.request.cycle.RequestCycle.detach(RequestCycle.java:477)
>         org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:255)
>         org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:160)
>         org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:216)
> ....
> The buffer structure "entries" may be emptied by one worker thread and tried to be emptied in another...

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