You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Edouard De Oliveira (JIRA)" <ji...@apache.org> on 2009/07/01 01:50:48 UTC

[jira] Resolved: (DIRMINA-714) Packet sequence is unordered in multi thread.

     [ https://issues.apache.org/jira/browse/DIRMINA-714?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Edouard De Oliveira resolved DIRMINA-714.
-----------------------------------------

    Resolution: Fixed

After much code crawling and testing, i came to the conclusion that the issue is now fixed.

If using the rewritten sequence test code provided as is it will probably fail because of the following tricky sequence

thread y / session S2 wants to write a message with seq=1 but it is stopped after getting the seq number
thread x / session S1 enter the messageReceived method and broadcasts a msg to all sessions (S1 & S2)
when writing to S2 it gets the seq=2 sequence number and writes but seq=1 was expected so it fails

So the problem is in the logic not in the filter nor in the Executor
Removing the broadcast call makes the test run flawlessly

> Packet sequence is unordered in multi thread.
> ---------------------------------------------
>
>                 Key: DIRMINA-714
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-714
>             Project: MINA
>          Issue Type: Bug
>          Components: Filter
>    Affects Versions: 2.0.0-M5
>         Environment: xp
>            Reporter: ncanis2
>            Assignee: Edouard De Oliveira
>             Fix For: 2.0.0-M7
>
>         Attachments: mina_m6_seq_test_src.zip, org.zip
>
>
> Hi.
> Packet sequence is unordered.
> = Server & Client = 
> chain.addLast("codec", new ProtocolCodecFilter(rcf));
> chain.addLast("executor", getExecuteFilter());    => OrderedThreadPoolExecutor c = new OrderedThreadPoolExecutor(20,100);
> If server send 1,2,3,4,5,6 , client receive 1,2,3,4,6  from server.
> Clients : 100.
> where I am wrong? 

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