Creating/deleting edges changes vertex versions - OrientDB 2.0

224 views
Skip to first unread message

BK

unread,
Mar 26, 2015, 1:45:12 PM3/26/15
to orient-...@googlegroups.com
Creating/deleting edges causes the version numbers of the connected vertices to change, and based on Andrey Lomakin's posts, this has been the behavior for a while (I'm using v2.0).  From his responses to similar questions, I've tried changing this behavior so that vertex versions remain unchanged when modifying edges: setting ridBag.embeddedToSbtreeBonsaiThreshold to -1 as a property in the console window as well as using `alter database custom ridBag.embeddedToSbtreeBonsaiThreshold=-1`.  The vertex versions are still being changed.

1. If this behavior is still configurable, what are the specific steps to configure it?  
2. Can someone also provide a little more information about the pros/cons of such a configuration, and why the default is that edge changes affect the vertex versions?

Thanks!

Example showing version changes:
orientdb {db=zDummy}> create class TestItem extends V
Class created successfully. Total classes in database now: 13
orientdb {db=zDummy}> create class TestEdge extends E
Class created successfully. Total classes in database now: 14

orientdb {db=zDummy}> insert into TestItem set name = "TestItem 0"
Inserted record 'TestItem#13:0{name:TestItem 0} v1' in 0.002000 sec(s).
orientdb {db=zDummy}> insert into TestItem set name = "TestItem 1"
Inserted record 'TestItem#13:1{name:TestItem 1} v1' in 0.001000 sec(s).
orientdb {db=zDummy}> select from TestItem

----+-----+--------+----------
#   |@RID |@CLASS  |name
----+-----+--------+----------
0   |#13:0|TestItem|TestItem 0
1   |#13:1|TestItem|TestItem 1
----+-----+--------+----------

2 item(s) found. Query executed in 0.002 sec(s).
orientdb {db=zDummy}> display 0

+-------------------------------------------------------------------------------------------------+
| Document - @class: TestItem                              @rid: #13:0           @version: 1      |
+-------------------------------------------------------------------------------------------------+
|                     Name | Value                                                                |
+-------------------------------------------------------------------------------------------------+
|                     name | TestItem 0                                                           |
+-------------------------------------------------------------------------------------------------+

orientdb {db=zDummy}> display 1

+-------------------------------------------------------------------------------------------------+
| Document - @class: TestItem                              @rid: #13:1           @version: 1      |
+-------------------------------------------------------------------------------------------------+
|                     Name | Value                                                                |
+-------------------------------------------------------------------------------------------------+
|                     name | TestItem 1                                                           |
+-------------------------------------------------------------------------------------------------+

orientdb {db=zDummy}> create edge TestEdge from #13:0 to #13:1
Created edge '[TestEdge#14:0{out:#13:0,in:#13:1} v3]' in 0.004000 sec(s).

orientdb {db=zDummy}> select from TestItem

----+-----+--------+----------+------------+-----------
#   |@RID |@CLASS  |name      |out_TestEdge|in_TestEdge
----+-----+--------+----------+------------+-----------
0   |#13:0|TestItem|TestItem 0|[size=1]    |null
1   |#13:1|TestItem|TestItem 1|null        |[size=1]
----+-----+--------+----------+------------+-----------

2 item(s) found. Query executed in 0.001 sec(s).
orientdb {db=zDummy}> display 0

+-------------------------------------------------------------------------------------------------+
| Document - @class: TestItem                              @rid: #13:0           @version: 2      |
+-------------------------------------------------------------------------------------------------+
|                     Name | Value                                                                |
+-------------------------------------------------------------------------------------------------+
|                     name | TestItem 0                                                           |
|             out_TestEdge | [#14:0]                                                              |
+-------------------------------------------------------------------------------------------------+

orientdb {db=zDummy}> display 1

+-------------------------------------------------------------------------------------------------+
| Document - @class: TestItem                              @rid: #13:1           @version: 2      |
+-------------------------------------------------------------------------------------------------+
|                     Name | Value                                                                |
+-------------------------------------------------------------------------------------------------+
|                     name | TestItem 1                                                           |
|              in_TestEdge | [#14:0]                                                              |
+-------------------------------------------------------------------------------------------------+

orientdb {db=zDummy}> delete edge #14:0
Delete record(s) '1' in 0.003000 sec(s).

orientdb {db=zDummy}> select from TestItem

----+-----+--------+------------+----------+-----------
#   |@RID |@CLASS  |out_TestEdge|name      |in_TestEdge
----+-----+--------+------------+----------+-----------
0   |#13:0|TestItem|[size=0]    |TestItem 0|null
1   |#13:1|TestItem|null        |TestItem 1|[size=0]
----+-----+--------+------------+----------+-----------

2 item(s) found. Query executed in 0.001 sec(s).
orientdb {db=zDummy}> display 0

+-------------------------------------------------------------------------------------------------+
| Document - @class: TestItem                              @rid: #13:0           @version: 3      |
+-------------------------------------------------------------------------------------------------+
|                     Name | Value                                                                |
+-------------------------------------------------------------------------------------------------+
|             out_TestEdge | []                                                                   |
|                     name | TestItem 0                                                           |
+-------------------------------------------------------------------------------------------------+

orientdb {db=zDummy}> display 1

+-------------------------------------------------------------------------------------------------+
| Document - @class: TestItem                              @rid: #13:1           @version: 3      |
+-------------------------------------------------------------------------------------------------+
|                     Name | Value                                                                |
+-------------------------------------------------------------------------------------------------+
|              in_TestEdge | []                                                                   |
|                     name | TestItem 1                                                           |
+-------------------------------------------------------------------------------------------------+

orientdb {db=zDummy}> properties
PROPERTIES:
+-------------------------------+--------------------------------+
| NAME                          | VALUE                          |
+-------------------------------+--------------------------------+
| collectionMaxItems            | 10                             |
| backupBufferSize              | 1048576                        |
| debug                         | false                          |
| backupCompressionLevel        | 9                              |
| limit                         | 20                             |
| width                         | 150                            |
| maxBinaryDisplay              | 150                            |
| ignoreErrors                  | false                          |
| ridBag.embeddedToSbtreeBonsaiThreshold| -1                             |
| verbose                       | 2                              |
+-------------------------------+--------------------------------+

orientdb {db=zDummy}> config

LOCAL SERVER CONFIGURATION:
+------------------------------------+--------------------------------+
| NAME                               | VALUE                          |
+------------------------------------+--------------------------------+
...
| ridBag.sbtreeBonsaiToEmbeddedToThreshold= -1                             |
...
+------------------------------------+--------------------------------+


Pramod N

unread,
Mar 31, 2015, 6:58:48 AM3/31/15
to orient-...@googlegroups.com
Have observed this in a different context. When we add edges to the same vertex in a concurrent fashion.
Posed this question to @lvca in another conversation https://groups.google.com/d/msg/orient-database/uu2j9W4paWU/5Y2IWbbWxHkJ
It'll be interesting to hear about this.

Vitor Enes Duarte

unread,
Apr 30, 2015, 6:28:37 AM4/30/15
to orient-...@googlegroups.com
+1

andrea tomassi

unread,
Nov 19, 2015, 6:00:58 PM11/19/15
to OrientDB
+1

Luca Garulli

unread,
Nov 19, 2015, 7:59:10 PM11/19/15
to OrientDB
Hi,
Are you connecting to a plocal or remote database? With remote database you should set that property on both client and server.

Best Regards,

Luca Garulli
Founder & CEO


--

---
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-databa...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andrey Lomakin

unread,
Nov 21, 2015, 6:12:18 AM11/21/15
to OrientDB
Hi,
That is regression we fixed it in all upcoming releases.
--
Best regards,
Andrey Lomakin, R&D lead. 
OrientDB Ltd

twitter:@Andrey_Lomakin linkedin:https://ua.linkedin.com/in/andreylomakin
Reply all
Reply to author
Forward
0 new messages