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

Sijie Guo commented on BOOKKEEPER-37:
-------------------------------------

more comments:

Even we could let client-side and server-side do the right thing, we could not 
guarantee client-side and server-side agrees on same topic ownership at the 
same time.

1. At time T0, HUB1 is the owner. Client has a cache entry indicating HUB1 is 
the owner.
2. 1 ~ K requests sent to HUB1.
3. At time T1, HUB1 released its ownership. 1~K requests are asked to redirect 
to right owner.
4. At time T1, Client has consider HUB1 is still the ownership. K+1 request is 
sent to HUB1.
5. the request are on-the-way to HUB1.
6. 1-K requests be redirected back to HUB1. out-of-order messages still happen.
                
> Ordering of published messages is not preserved when doing asynchronous 
> publication
> -----------------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-37
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-37
>             Project: Bookkeeper
>          Issue Type: Bug
>          Components: hedwig-client
>    Affects Versions: 4.0.0
>            Reporter: Matthieu Morel
>            Assignee: Matthieu Morel
>             Fix For: 4.2.0
>
>         Attachments: BOOKKEEPER-37.patch, ClientMessageOrderingTest.java
>
>
> Symptoms: 
> - if a publisher sends messages asynchronously through the asyncPublish 
> method, the ordering is not preserved in Hedwig
> Example: 
> - a publisher sends M1, M2, M3 by invoking the asyncPublish method
> The Hedwig broker may see these messages in the following order: M2, M1, M3
> A subscriber will also see messages as M2, M1, M3
> How to reproduce:
> - see attached test case: synchronous publishing preserves ordering, but 
> asynchronous publishing does not.
> The cause of the problem:
> - my understanding is that this is due to asynchronous creation of multiple 
> netty channels on the publisher side. There is no ordering since messages are 
> not sent through the same channel. 
> Suggested solution:
> Some buffering on the publisher side would allow to reuse the same channel 
> and maintain ordering.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to