# Replacing a Dgraph Alpha assigns it to a new group

**URL:** <https://discuss.dgraph.io/t/replacing-a-dgraph-alpha-assigns-it-to-a-new-group/8439>\
**Category:** Dgraph\
**Tags:** dgraph, kind:bug, status:needs-attenti\
**Created:** [April 26, 2019, 12:14am UTC](https://discuss.dgraph.io/t/replacing-a-dgraph-alpha-assigns-it-to-a-new-group/8439 "2019-04-26T00:14:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![diggy](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/diggy/32/3666_2.png) [@diggy](https://discuss.dgraph.io/u/diggy)\
**Post date:** [April 26, 2019, 12:14am UTC](https://discuss.dgraph.io/t/replacing-a-dgraph-alpha-assigns-it-to-a-new-group/8439/1 "2019-04-26T00:14:32Z")

</div>

**Moved from GitHub [dgraph/3326](https://github.com/dgraph-io/dgraph/issues/3326)**

_Posted by_ [danielmai](https://github.com/danielmai):

If you suspect this could be a bug, follow the template.

- What version of Dgraph are you using?  
master, latest (v1.0.14)

- Have you tried reproducing the issue with latest release?  
Yes

- What is the hardware spec (RAM, OS)?  
n/a

- Steps to reproduce the issue (command/config used to run Dgraph).

1. Run Dgraph cluster with 1 Zero, 1 Alpha.
2. Remove the Alpha with removeNode. Check it’s ID and group membership with Zero’s /state.

```auto
curl localhost:6080/removeNode?group=1&id=1

```

1. The Alpha is removed and will stop running. It’s removal can be checked by looking at Zero’s /state.
2. Start a new Alpha. The Alpha will join the cluster under Group 2.

Continuing steps 2 to 4 will assign the Alpha to a new group.

- Expected behaviour and actual result.

I expected the Alpha to replace the previous Alpha’s membership.

In a two node cluster, when an Alpha is added to the cluster Zero should assign membership to the empty group 1.

In the general case, Zero should add Alphas to fill in empty membership spots in existing groups first before creating another group.

---

<div class="post-metadata">

**Author:** ![diggy](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/diggy/32/3666_2.png) [@diggy](https://discuss.dgraph.io/u/diggy)\
**Post date:** [May 14, 2019, 7:27am UTC](https://discuss.dgraph.io/t/replacing-a-dgraph-alpha-assigns-it-to-a-new-group/8439/2 "2019-05-14T07:27:09Z")

</div>

[balajijinnah](https://github.com/balajijinnah) _commented_ :

I like to take this if no one is working on it.

---

<div class="post-metadata">

**Author:** ![diggy](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/diggy/32/3666_2.png) [@diggy](https://discuss.dgraph.io/u/diggy)\
**Post date:** [May 14, 2019, 2:22pm UTC](https://discuss.dgraph.io/t/replacing-a-dgraph-alpha-assigns-it-to-a-new-group/8439/3 "2019-05-14T14:22:22Z")

</div>

[manishrjain](https://github.com/manishrjain) _commented_ :

@sch00lb0y : Feel free.

---

<div class="post-metadata">

**Author:** ![diggy](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/diggy/32/3666_2.png) [@diggy](https://discuss.dgraph.io/u/diggy)\
**Post date:** [January 23, 2020, 10:38am UTC](https://discuss.dgraph.io/t/replacing-a-dgraph-alpha-assigns-it-to-a-new-group/8439/4 "2020-01-23T10:38:40Z")

</div>

[sleto-it](https://github.com/sleto-it) _commented_ :

Hi @balajijinnah - was this fixes or is it still open?  
I see a PR from you, which was then closed and not merged

Please could you share an update on this. If this is fixed, in which version did the fix go

Thanks,
