# Moving predicates - no downtime

**URL:** <https://discuss.dgraph.io/t/moving-predicates-no-downtime/3228>\
**Category:** Dgraph\
**Created:** [September 14, 2018, 6:38pm UTC](https://discuss.dgraph.io/t/moving-predicates-no-downtime/3228 "2018-09-14T18:38:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexmilowski](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/alexmilowski/32/1246_2.png) [@alexmilowski](https://discuss.dgraph.io/u/alexmilowski)\
**Post date:** [September 14, 2018, 6:38pm UTC](https://discuss.dgraph.io/t/moving-predicates-no-downtime/3228/1 "2018-09-14T18:38:48Z")

</div>

IMHO, this “error” should never happen:

{“code”: “ErrorInvalidRequest”, “message”: “Predicate is being moved, please retry later”}

Can’t predicates be moved without downtime to insertions or queries? This kind of internal database operation should be hidden from the user.

---

<div class="post-metadata">

**Author:** ![dmai](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/dmai/32/1254_2.png) [@dmai](https://discuss.dgraph.io/u/dmai)\
**Post date:** [September 14, 2018, 6:51pm UTC](https://discuss.dgraph.io/t/moving-predicates-no-downtime/3228/2 "2018-09-14T18:51:07Z")

</div>

Dgraph prevent transactions between predicate moves to maintain consistency of reads and writes for those particular predicates.

It’s important for clients to know to retry later since their request was not completed successfully.

---

<div class="post-metadata">

**Author:** ![alexmilowski](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/alexmilowski/32/1246_2.png) [@alexmilowski](https://discuss.dgraph.io/u/alexmilowski)\
**Post date:** [September 14, 2018, 6:53pm UTC](https://discuss.dgraph.io/t/moving-predicates-no-downtime/3228/3 "2018-09-14T18:53:41Z")

</div>

I understand the motivation … other database (most?) do not work this way.

---

<div class="post-metadata">

**Author:** ![dmai](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/dmai/32/1254_2.png) [@dmai](https://discuss.dgraph.io/u/dmai)\
**Post date:** [September 14, 2018, 8:29pm UTC](https://discuss.dgraph.io/t/moving-predicates-no-downtime/3228/4 "2018-09-14T20:29:12Z")

</div>

Dgraph is a distributed transactional database. Most other databases aren’t like that.

---

<div class="post-metadata">

**Author:** ![alexmilowski](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/alexmilowski/32/1246_2.png) [@alexmilowski](https://discuss.dgraph.io/u/alexmilowski)\
**Post date:** [September 14, 2018, 8:46pm UTC](https://discuss.dgraph.io/t/moving-predicates-no-downtime/3228/5 "2018-09-14T20:46:19Z")

</div>

You should substantiate that claim. I’m looking at this from an enterprise perspective. We handle a lot of very large scale databases here at Orange. Transaction resilience is an expected feature.

---

<div class="post-metadata">

**Author:** ![MichelDiz](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/micheldiz/32/11873_2.png) [@MichelDiz](https://discuss.dgraph.io/u/MichelDiz)\
**Post date:** [September 14, 2018, 8:55pm UTC](https://discuss.dgraph.io/t/moving-predicates-no-downtime/3228/6 "2018-09-14T20:55:31Z")

</div>

Hi Alex, can you explain what are your worries about this?

In priori I don’t believe that info is that much important. But maybe we can add an option to not display it or customize. But please, could you explain exactly where and how it would affect something. Like as security? why?

Cheers.

---

<div class="post-metadata">

**Author:** ![alexmilowski](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/alexmilowski/32/1246_2.png) [@alexmilowski](https://discuss.dgraph.io/u/alexmilowski)\
**Post date:** [September 14, 2018, 9:01pm UTC](https://discuss.dgraph.io/t/moving-predicates-no-downtime/3228/7 "2018-09-14T21:01:48Z")

</div>

Having to consistently retry transactions because of “Unable to find log file. Please retry” or “Predicate is being moved, please retry later” makes me question the consistency of the database. It a parallel insert process where idempotency is relative (e.g., data without consistent identifiers), this is very concerning.

Given the inconsistent and unreliable responses, I may have to consider another database solution.

---

<div class="post-metadata">

**Author:** ![amanmangal](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/amanmangal/32/1249_2.png) [@amanmangal](https://discuss.dgraph.io/u/amanmangal)\
**Post date:** [September 17, 2018, 3:01am UTC](https://discuss.dgraph.io/t/moving-predicates-no-downtime/3228/8 "2018-09-17T03:01:48Z")

</div>

I have seen this issue as well. Because I was testing, I simply deleted all the data and restarted. Though, I wonder how long predicate move should take? My guess is that either there is a bug or a performance bottleneck 'cause it should be pretty fast to move 90MB (that’s the number I observed) data on a high speed 10G network. I remember waiting for at least few minutes if not more before recreating the cluster.
