Inconsistent versions in distributed setup

87 views
Skip to first unread message

Zeeshan Ahmad

unread,
Jul 18, 2017, 7:24:31 AM7/18/17
to orient-...@googlegroups.com
hey,

I have 2 master distributed setup of orientdb in production. 
My default-distributed-db-config.json

{
  "replication": true,
  "hotAlignment" : true,
  "autoDeploy": true,
  "readQuorum": 1,
  "writeQuorum": "majority",
  "executionMode": "undefined",
  "readYourWrites": true,
  "newNodeStrategy": "dynamic",
  "servers": {
    "orientMaster": "master",
    "orientMaster2": "master"
  },
  "clusters": {
    "internal": {
    },
    "*": {
      "servers": ["<NEW_NODE>"]
    }
  }
}

somehow few of the records have different version id's of the different servers. One of them has v57 and other v55
Because of this i am getting :
"Cannot UPDATE the record #25:426820 because the version is not the latest. Probably you are updating an old record or it has been modified by another user (db=v57 your=v55)\r\n\tDB name=\"superuser\""
at client side.

I am using orientdb 2.2.21

Is this a known issue? how can i fix this?. how is this not detected in synchronisation? 
Need help immediately because i am using this in production.

Thanks,
Zeeshan


Zeeshan Ahmad

unread,
Jul 20, 2017, 4:18:50 AM7/20/17
to OrientDB
can anyone help on this? If there is no solution to this, we will have to drop the plan of using ODB in production.


Luca Garulli

unread,
Jul 20, 2017, 6:18:02 AM7/20/17
to OrientDB
Hi Zeeshan,

First of all, please upgrade to the latest 2.2.x that is 2.2.23 right now. We fixed some synchronization issues.

Then, did you check that on 2 servers the version wasn't the same? Try this query "select from #25:426820" on both servers.

Best Regards,

Luca Garulli
Founder & CEO

On 20 July 2017 at 10:18, Zeeshan Ahmad <zeesha...@grofers.com> wrote:
can anyone help on this? If there is no solution to this, we will have to drop the plan of using ODB in production.


--

---
You received this message because you are subscribed to the Google Groups "OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orient-database+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Zeeshan Ahmad

unread,
Jul 20, 2017, 9:35:37 AM7/20/17
to OrientDB
I am upgrading to 2.2.23. And yes i checked on individual servers via console. One of it had v55 and other v57.
I will try with latest version and see if i get this error again.



Zeeshan Ahmad

unread,
Jul 26, 2017, 3:33:42 PM7/26/17
to OrientDB
hey,
i upgraded ODB to latest version but again ran into same issue.

DOCUMENT @class:SuperUser @rid:#29:813364 @version:10
+----+----------+-------------------+
|#   |NAME      |VALUE              |
+----+----------+-------------------+
|0   |in_has    |[#41:915402]       |
|1   |install_ts|2017-02-09 16:51:59|
+----+----------+-------------------+


DOCUMENT @class:SuperUser @rid:#29:813364 @version:11
+----+----------+-------------------+
|#   |NAME      |VALUE              |
+----+----------+-------------------+
|0   |in_has    |[#41:915402]       |
|1   |install_ts|2017-02-09 16:51:59|
+----+----------+-------------------+

as you can see the version the different in both machines.
Can this be manually fixed? No further updation query works for this rid.

Zeeshan Ahmad

unread,
Jul 28, 2017, 1:43:25 AM7/28/17
to OrientDB
is there any solution to this? I don't want to migrate database again just to solve this problem.
Can anyone help me here.

maggi...@gmail.com

unread,
Jul 28, 2017, 2:11:34 AM7/28/17
to orient-...@googlegroups.com
Hi Zeeshan

How can I replicate this with oriendb 2.2.24?

Thanks

Zeeshan Ahmad

unread,
Jul 28, 2017, 2:24:57 PM7/28/17
to OrientDB
hey,
Currently i am unable to reproduce the issue via test case. I guess this happened when one update query was terminated abruptly. I was running a python script which had update queries for orientdb, it was terminated abruptly.
I thought there might be a work around if by any chance there was a miss match in versions across distributed system.


Thanks


On Tuesday, July 18, 2017 at 4:54:31 PM UTC+5:30, Zeeshan Ahmad wrote:

Zeeshan Ahmad

unread,
Aug 1, 2017, 5:49:14 AM8/1/17
to OrientDB
hey,
i am still stuck on this issue. It happened when one of the machines went down and in a minute came back up.
Can anyone suggest a workaround.


On Tuesday, July 18, 2017 at 4:54:31 PM UTC+5:30, Zeeshan Ahmad wrote:

Zeeshan Ahmad

unread,
Aug 1, 2017, 10:19:27 AM8/1/17
to OrientDB
an update regarding this.
I fixed this by updating the record on the server which had higher version of the record.
To start with, server1 had RID=1102 and server 2 had RID=1104. I updated the record manually from the console on server2. After this both servers had @RID=1105.

But this is manually work around. I think there should a command that can enforce records to be synced again across the distributed servers.

Enrico Risa

unread,
Aug 1, 2017, 10:31:29 AM8/1/17
to orient-...@googlegroups.com
Hi Zeeshan

probably this should fix your issue

https://github.com/orientechnologies/orientdb/commit/e9d9f6f41eb2722e5657e8242954286c085a0990

You can try the snapshot once it's rolled out, or you can wait the 2.2.25 GA that should be out tomorrow

Thanks

Reply all
Reply to author
Forward
0 new messages