You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How about a JOINSHARD primitive? I think it makes more sense to expose a high level construct around shards, as opposed to letting admins manipulate the shard-id directly. Specifically, I propose the below:
A node N can explicitly join a shard S as identified by its <shard-id> via CLUSTER JOINSHARD <shard-id>
If shard S is not empty, N will try locating its primary P and initiate replication, as long as it sees one live node in S
otherwise, if all nodes in S are permanently down, N should attempt a manual failover
otherwise, there is no node in S and this means that the cluster is not aware of this shard at all. I'd propose we fail the JOINSHARD request.
For completeness, the following two have been implemented in this PR:
A new node N always starts out in its own shard with an auto-generated shard-id
A node N implicitly joins an existing shard via CLUSTER REPLICATE <primary-node-id>
How about a
JOINSHARD
primitive? I think it makes more sense to expose a high level construct around shards, as opposed to letting admins manipulate the shard-id directly. Specifically, I propose the below:A node
N
can explicitly join a shardS
as identified by its<shard-id>
viaCLUSTER JOINSHARD <shard-id>
S
is not empty,N
will try locating its primaryP
and initiate replication, as long as it sees one live node inS
S
are permanently down,N
should attempt a manual failoverS
and this means that the cluster is not aware of this shard at all. I'd propose we fail theJOINSHARD
request.For completeness, the following two have been implemented in this PR:
N
always starts out in its own shard with an auto-generated shard-idN
implicitly joins an existing shard viaCLUSTER REPLICATE <primary-node-id>
Originally posted by @PingXie in #10536 (comment)
The text was updated successfully, but these errors were encountered: