RID Reuse for storage type memory

27 views
Skip to first unread message

Dário Marcelino

unread,
Dec 30, 2014, 5:27:49 PM12/30/14
to orient-...@googlegroups.com
Hi everyone,

After some researching and going through the docs I got the impression that OrientDB would not reuse RIDs since v1.6. But that doesn't seem to hold true for storage type memory. I've just downloaded a fresh copy of v1.7.10 and ran the following commands through the console:
create database remote:localhost/rid_reuse_mem root root memory
create class userTable extends V
create vertex userTable set first_name = "delete"
create vertex userTable set first_name = "delete"
DELETE VERTEX FROM userTable WHERE first_name = "delete"
create vertex userTable set first_name = "user_0"
create vertex userTable set first_name = "user_1"
create vertex userTable set first_name = "user_2"
select from userTable

And I got:

----+-----+----------

#   |@RID |first_name

----+-----+----------

0   |#11:0|user_1    

1   |#11:1|user_0    

2   |#11:2|user_2    

----+-----+----------


So, the RIDs #11:0 and #11:1 were reused contrary to my expectations. Even worse, it seems that when the RIDs are reused they are done in descending order, messing up the insertion order...

Can this behaviour be changed through configuration?

'plocal' behaved as expected.

Thanks!

Luca Garulli

unread,
Dec 30, 2014, 6:46:22 PM12/30/14
to orient-database
Hi,
This has been fixed from 2.0-*.

Lvc@


--

---
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.

Dário Marcelino

unread,
Dec 30, 2014, 6:59:51 PM12/30/14
to orient-...@googlegroups.com
That's good to know, thanks Luca.
Reply all
Reply to author
Forward
0 new messages