You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Pinaki Poddar (JIRA)" <ji...@apache.org> on 2009/02/26 17:33:01 UTC

[jira] Commented: (OPENJPA-825) slices: hangs with multithreaded true

    [ https://issues.apache.org/jira/browse/OPENJPA-825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12677055#action_12677055 ] 

Pinaki Poddar commented on OPENJPA-825:
---------------------------------------

Two primary objectives or hard constraints
1. Slice must execute database operations in parallel. Otherwise the basic purpose of working with distributed data in an efficient manner is defeated.
2. OpenJPA's threading model should not be altered. Threading model is hard to retrofit and OpenJPA's current threading model is battle-tested. Any fundamental alteration is a risk not worth taking.

One approach to meet the above criteria and address this difficult reported issue is to incorporate a variation on threading model for Slice module. Let each slice run on a specialized SliceThread which acts like a child of a parent 'user' thread. The parent thread is the thread that invoked the Broker/EntityManager operation. When the control reaches to Slice for executing database operation, let Slice spawn specialized SliceThread. Let a SliceThread use its parent's lock. But do this only for Broker and not for Query (which has its own reentrant lock). 

> slices: hangs with multithreaded true
> -------------------------------------
>
>                 Key: OPENJPA-825
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-825
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: slice
>    Affects Versions: 2.0.0
>            Reporter: Fernando
>            Assignee: Pinaki Poddar
>            Priority: Critical
>         Attachments: hang-multithread-2.jstack, hang-multithread.jstack, hang-multithread.txt
>
>
> When I turned on openjpa.Multithreaded as a possible fix for another bug, I see that the system hangs.  Attached are going to be a log file, and jstack, showing how it system hung on the very first query. ( it did execute a few find() operations, but those are not executed via ParallelExecutor ).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.