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

Sijie Guo commented on BOOKKEEPER-422:
--------------------------------------

if a hub server owns millions of topics, each topic has one local subscribers 
and 3 non-local subscribers, each time #hasLocalSubscriptions needs go thru 4 
subscribers to lookup one. but it might be a problem although. I was thinking 
if it is possibile to change HashMap (used to store subscribers) to SortedMap, 
so we could cluster non-local subscribers together since they are started with 
underscore. it might help improving at some case.

Besides this jira, I just found that it seems we don't validate the subscriber 
id. If a local subscriber provides a subscriber id prefixed with underscore, it 
might be treated as a non-local subscriber. it might be a problem. If it is a 
problem, we need a separated jira for it.
                
> Simplify AbstractSubscriptionManager
> ------------------------------------
>
>                 Key: BOOKKEEPER-422
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-422
>             Project: Bookkeeper
>          Issue Type: Improvement
>          Components: hedwig-server
>            Reporter: Stu Hood
>            Assignee: Stu Hood
>            Priority: Minor
>         Attachments: bk-422.diff, bk-422.diff, bk-422.diff
>
>
> It's difficult to maintain a duplicated/cached count of local subscribers, 
> and we've experienced a few issues due to it getting out of sync with the 
> actual set of subscribers. Since a count of local subscribers can be 
> calculated from the top2sub2seq map, let's do that instead.

--
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