How to avoid vertices' version increase when creating edges?

165 views
Skip to first unread message

Vitor Enes Duarte

unread,
Apr 29, 2015, 6:30:46 AM4/29/15
to orient-...@googlegroups.com
Hi,

I was told to
java ... -Dindex.embeddedToSbtreeBonsaiThreshold=-1
if I wanted to avoid vertices's version increase when creating edges. But I can't make it work.


OrientDB console v.2.0.7 (build UNKNOWN@r; 2015-04-14 11:18:06+0000) www.orientechnologies.com
Type 'help' to display all the supported commands.
Installing extensions for GREMLIN language v.2.6.0

orientdb
> connect remote:localhost root root

Connecting to remote Server instance [remote:localhost] with user 'root'...OK
orientdb
{server=remote:localhost/}> config get index.embeddedToSbtreeBonsaiThreshold  

Remote configuration: index.embeddedToSbtreeBonsaiThreshold = 40

orientdb
{server=remote:localhost/}> config set index.embeddedToSbtreeBonsaiThreshold -1

Remote configuration value changed correctly

orientdb
{server=remote:localhost/}> config get index.embeddedToSbtreeBonsaiThreshold  

Remote configuration: index.embeddedToSbtreeBonsaiThreshold = -1

orientdb
{server=remote:localhost/}> create database remote:localhost/Test root root plocal

Creating database [remote:localhost/Test] using the storage type [plocal]...
Disconnecting from remote server [remote:localhost/]...
OK
Connecting to database [remote:localhost/Test] with user 'admin'...OK
Database created successfully.

Current database is: remote:localhost/Test
orientdb
{db=Test}> create vertex set name  = 'source'

Created vertex 'V#9:0{name:source} v1' in 0.025000 sec(s).

orientdb
{db=Test}> create vertex set name = 'target'

Created vertex 'V#9:1{name:target} v1' in 0.002000 sec(s).

orientdb
{db=Test}> select @version from V

----+------+-------
#   |@CLASS|version
----+------+-------
0   |null  |1      
1   |null  |1      
----+------+-------

orientdb
{db=Test}> create edge from #9:0 to #9:1

Created edge '[E#10:0{out:#9:0,in:#9:1} v3]' in 0.010000 sec(s).

orientdb
{db=Test}> select @version from V

----+------+-------
#   |@CLASS|version
----+------+-------
0   |null  |2      
1   |null  |2      
----+------+-------

What am I doing wrong?

Vitor Enes Duarte

unread,
May 5, 2015, 4:28:19 AM5/5/15
to orient-...@googlegroups.com
Sorry to push this.
Can anyone take a look at this?

Thanks,

intpo...@gmail.com

unread,
May 5, 2015, 11:32:39 AM5/5/15
to orient-...@googlegroups.com
Why would you need the version of a vertex to not to change when as a matter of fact your are introducing a modification to the vertex by creating an edge between the two records?
if you do select * from V you'll see a new property added to the vertex called out_<name_of_the_edge> and another in_<name_of_the_edge> for the other vertex. If you do select * from E you'll see a record #10:0 with two columns out:#9:0 and in:#9:1.

I mean keeping track of the version of records provides you with the insight to know which ones have been updated the most, what you want is to get rid of version tracking altogether and don't think that can be done; And it is not clear what would you need that for or why the version of a record increasing is limiting you in what you want to do.

Vitor Enes Duarte

unread,
May 5, 2015, 11:45:34 AM5/5/15
to orient-...@googlegroups.com
Hi,

Thank you for you answer.
You can see here why I need this feature: I don't want CME when creating edges.

Vitor,

intpo...@gmail.com

unread,
May 5, 2015, 1:32:17 PM5/5/15
to orient-...@googlegroups.com
I mean you are changing just the local configuration there.

I you wanted to change the Global configuration you could add

-Dindex.embeddedToSbtreeBonsaiThreshold=-1 -DridBag.embeddedToSbtreeBonsaiThreshold=-1 -DridBag.embeddedDefaultSize=-1

to the server and console scripts %ORIENT_HOME%/bin

open the files and look down where it calls the java machine: call %JAVA% -server ... <%options_xxxx%>... <insert those above commands> ...

otherwise those configs (the index.xxx and ridbag.xxx eventually get reverted to 40)

So that is the answer on how to change those values, but it does nothing on what you want as it keeps on updating the version anyway.

Vitor Enes Duarte

unread,
May 6, 2015, 4:20:22 AM5/6/15
to orient-...@googlegroups.com
Yes, they have no effect. I started there, adding those options to java, but no luck.
So I decided to try the console, but I was expecting that the values wouldn't be reverted.

This is supported (See here).
Thanks again,
Reply all
Reply to author
Forward
0 new messages