[
https://issues.apache.org/jira/browse/BOOKKEEPER-407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13458429#comment-13458429
]
Sijie Guo commented on BOOKKEEPER-407:
--------------------------------------
1) as my previous comment, I agreed Set is better than ConcurrentLinkedQueue.
2) I agreed either using put or replace works well in my previous comment. but
I also indicated the difference between them. using put, it needs to set if
first and clear it later for concurrent operations at same time. using replace
could prevent one. if there are concurrent async requests when a topic moved,
they might try to store new ownership for this topic concurrently. using put,
these store actions might be executed each request; using replace, it could do
much better to mostly have one execute the store action.
> Hedwig client doesn't remove old topic2Host mapping in case of redirect
> -----------------------------------------------------------------------
>
> Key: BOOKKEEPER-407
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-407
> Project: Bookkeeper
> Issue Type: Bug
> Affects Versions: 4.2.0
> Reporter: Aniruddha
> Fix For: 4.2.0
>
> Attachments: BK-407.patch
>
>
> In the storeTopic2HostMapping function, there is a topic2Host.putIfAbsent().
> This doesn't seem correct as we should always update the mapping in case of a
> redirect.
> Reviewboard : https://reviews.apache.org/r/7139/
--
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