Hi,
dave irving wrote:
> Mikael Ronstrom wrote:
>
> > First partition goes to first group, next
> partition to next group
> > and so forth. Each partition is placed on all
> nodes in the node group it is placed.
>
> I think Im still not quite getting this 100% :o)
> My understanding was based on
>
http://dev.mysql.com/doc/refman/5.0/en/mysql-clust
> er-db-definition.html, which says:
>
> "Node groups are formed implicitly. The first node
> group is formed by the set of data nodes with the
> lowest node IDs, the next node group by the set of
> the next lowest node identities, and so on".
>
> I also believed that the number of partitions ==
> number of node groups
> (http://dev.mysql.com/doc/refman/5.0/en/mysql-clus
> ter-nodes-groups.html).
>
No, number of partitions == number of nodes, It seems that there is a bug in the
manual in this area. I'll notify the docs team of this.
> So for setting up node groups and partitions, the
> only variables I could see were:
>
> a) The number of data nodes
> b) The value of the NoOfReplicas parameter
>
Correct
> Hence my example: If I have 4 data nodes (1, 2, 3,
> 4) and number of replicas == 2, I thought that
> nodes 1 and 2 would form the first group
> (partition "A") and nodes 3 and 4 would form the
> second group (partition "B"). Thus I thought that
> data would be partitioned across groups A and B,
> and replicated within them.
>
Correct.
> Likewise, If I have 2 data nodes (1, 2) and number
> of replicas == 2, I thought that nodes 1 and 2
> would form the first and only group (partition
> "A"). Thus I thought that data would be replicated
> across nodes 1 and 2, but not partitioned.
>
Correct but data will still be partitioned in two partitions so that one
shares the primary replica role over the 2 nodes as well.
> So I guess Im not getting something, as my
> understanding does not tally with your comment:
>
Pro
> > Actually the number of partitions is equal to
> the number of data nodes.
>
> Could you possibly elaborate to help me clear up
> my confusion?
>
> Many thanks,
>
> Dave
Mikael Ronstrom
Senior Software Architect, MySQL AB
My blog:
http://mikaelronstrom.blogspot.com