You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jonathan Ellis (JIRA)" <ji...@apache.org> on 2012/06/26 22:03:43 UTC

[jira] [Commented] (CASSANDRA-4121) TokenMetadata supports multiple tokens per host

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

Jonathan Ellis commented on CASSANDRA-4121:
-------------------------------------------

The big question mark in my mind is if BMVM and SBMVM are worth the complexity (and potential for bugs) over just inlining the Map/Multimap pair into TMD.  Most operations on tokenToEndpointMap and bootstrapTokens touch other collections already, and need to be explicitly locked anyway.

I guess the big win is that it makes the new code a lot more 1:1 with what it replaces, which may be enough to justify it.  But you still can't get away from looping where you used to have a single Token per endpoint...

If we do go with these wrappers I'd prefer to keep it as thin as possible -- no internal synchronization, no copies on inverse().  (I think the existing synchronizied wrapper around the bootstrapTokens BiMap saves us exactly one use of the explicit lock, in pendingRangeChanges.  I'm fine with giving that up.)

Other comments:

- Would it simplify things to make calculateNaturalEndpoints return Set?  getNaturalEndpoints can still copy into an ArrayList for callers that want to sort.
- forceTableRepairPrimaryRange could use FBUtilities.waitOnFutures
- @Override on SBMVM is redundant
- some redundant type information on .create calls
                
> TokenMetadata supports multiple tokens per host
> -----------------------------------------------
>
>                 Key: CASSANDRA-4121
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4121
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: Core
>            Reporter: Sam Overton
>            Assignee: Sam Overton
>              Labels: vnodes
>
> _Edit0: Append patch information._
> h3. Patches
> ||Compare||Raw diff||Description||
> |[01_support_multiple_tokens_per_host|https://github.com/acunu/cassandra/compare/top-bases/p/4121/01_support_multiple_tokens_per_host...p/4121/01_support_multiple_tokens_per_host]|[01_support_multiple_tokens_per_host.patch|https://github.com/acunu/cassandra/compare/top-bases/p/4121/01_support_multiple_tokens_per_host...p/4121/01_support_multiple_tokens_per_host.diff]|Support associating more than one token per node|
> ----
> _Note: These are branches managed with TopGit. If you are applying the patch output manually, you will either need to filter the TopGit metadata files (i.e. {{wget -O - <url> | filterdiff -x*.topdeps -x*.topmsg | patch -p1}}), or remove them afterward ({{rm .topmsg .topdeps}})._

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira