-
Notifications
You must be signed in to change notification settings - Fork 872
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sequence used multiple times in single transaction block is not incremented #7547
Comments
Interesting, saw this behavior in 3.0 in the beginning (couple of months ago) and it is fixed in 3.0 snapshots already. we are able to use in our product (in development) that used orientDB 3.0. |
Hi, I finally isolated the bug and it seems to be related to remote connections. I created a repository for it located under https://github.com/fixundfertig123/7547/commits/master When running in memory or plocal it is working (Checkout https://github.com/fixundfertig123/7547/tree/93abef43ee20d565375bcd6862336be7b299e36f) When changing to remote connection (checkout https://github.com/fixundfertig123/7547/tree/b9eecee009901167b59d754322b3e3fd0ed3899d) neither the index nor the sequence is correct. Prior to that you have to create an according orientDB yourself (I do not know how to do that in automatically). My output looks like:
which is nonsense as you can see from the code. If you have any questions, just let me know. |
I commited a change adding ODatabaseRecordThreadLocal.INSTANCE in the beginning to run it from the shell, not just Eclipse |
hi @fixundfertig123, I could reproduce it and fix it, I added also a test case in our java suite, it will be released with 2.2.24 and 3.0.0-m2. Regards. |
Hi @tglman, great. Thanks! I assume you mean 2.2.24 ;-) Do you roughly know, when it will be available. I will test it as soon as available. Regards |
hi @fixundfertig123, Yep sure changed, is going to be this week or at most next. Regards |
Hi, We are releasing 2.2.24. I am closing this issue now. Many thanks, |
I just run into a strange issue with the in memory database and testsuites. It looks like a similar issue than the one above, but also strange. I wrote a TestClass and added it via a project: https://github.com/fixundfertig123/7547/releases/tag/InMemoryErrorFlatSpec (via sbt: clean / compile / test) As you will see, although the graphs are fetched from for every test from the pool, they are somehow not handled correctly. If you enable "graph.getRawGraph.reload" in line 76 it works. Thanks & Cheers |
@santo-it pls make sure if anything is updated for good, pls get that to 3.0 develop branch too. |
@tglman Sorry for bothering you, but this issue is blocking our testsuite and migration to a current 2.2.x. Could you please give me an indication, whether you can confirm my bug. Kind regards |
hi @fixundfertig123, We tried to run the project and we got some problem I opened a different issue on that problem, here it is: #7641, I'm closing this one again, regards. |
OrientDB Version: 2.2.22
Java Version: 1.8.0_92
OS: Windows 7
Expected behavior
A sequence used as a default value in multiple vertex classes (as uniqueID) in same transaction block should increment by one within each created vertex.
Actual behavior
If run in transaction block, sequence is not updated, and all vertices get the same "uniqueID" and due to an index an exception is thrown:
Steps to reproduce
"ALTER PROPERTY V_XXXXX.uniqueID DEFAULT 'sequence("seqCounter").next()'"
Debugging the "OTransaction" in method "public List commit(final OTransaction iTx, final Runnable callback)" shows the follwing entries in OTransaction object (I assume as ORecordOperation):
In my opinion the uniqueID values 516 of both vertices should not be set, since the are to be generated upon commit??? I did not insert the uniqueID property value via the API. This has been done somewhere in the orientDB.
Reloading the sequence in the middle of the transaction between both vertex creations via:
caused exception (basing on the same reason than in issue #7046):
I cannot provide you code yet, but I try to reduce the code to an standalone example.
The text was updated successfully, but these errors were encountered: