-
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
dijkstra throwing exceptions in some cases #7869
Comments
HI @agarciaGIT you have a broken DB, some edges point to non-existing vertices. +----+-------+--------+-----+--------+------+----------------+ (I don't know if the RID matches, during the import it can change) that points to #19:1798 vertex, that doesn't exist. I'm adding some checks to dijkstra() function to prevent exceptions, but the real problem here is not in the implementation Thanks Luigi |
OK thanks. I will drop the DB and reload it and see if that works.
AG
…On Mon, Nov 6, 2017 at 10:01 AM, luigidellaquila ***@***.***> wrote:
HI @agarciaGIT <https://github.com/agarciagit>
you have a broken DB, some edges point to non-existing vertices.
In my instance I found this edge
+----+-------+--------+-----+--------+------+----------------+
|# ***@***.*** <https://github.com/rid> ***@***.*** <https://github.com/class> |out
|in |weight|type |
+----+-------+--------+-----+--------+------+----------------+
|0 |#20 <#20>
:129|EPartner|#39
<#39>:6|#19
<#19>:1798|1
|Research Partner|
+----+-------+--------+-----+--------+------+----------------+
(I don't know if the RID matches, during the import it can change) that
points to #19 <#19>:1798
vertex, that doesn't exist.
I'm adding some checks to dijkstra() function to prevent exceptions, but
the real problem here is not in the implementation
Thanks
Luigi
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7869 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACQXMaQy65MmmIyabLLJ3ZXYVukqAFkmks5szxE-gaJpZM4QSAkq>
.
|
OrientDB Version: 2.2.29
Java Version: 1.8.0_111
OS: Amazon Linux AMI 2016.09
Expected behavior
Running dijkstra will return the cheapest path between two vertices
Actual behavior
Exceptions are thrown in certain cases
Steps to reproduce
I have a graph where I added the Property 'weight' to E. I created other Sub classes from E and V. If I run shortestPath I get a response. If I run dijkstra on the same source and destination I get an exception.
orientdb {db=SpinOffIntelligence}> select shortestPath(#30:5,#39:3,'BOTH')
+----+---------------------+
|# |shortestPath |
+----+---------------------+
|0 |[#30:5,#13:780,#39:3]|
+----+---------------------+
1 item(s) found. Query executed in 0.002 sec(s).
orientdb {db=SpinOffIntelligence}> select dijkstra(#30:5,#39:3,'weight','BOTH')
Error: com.orientechnologies.orient.core.exception.OCommandExecutionException: Error on execution of command: sql.select dijkstra(#30:5,#39:3,'weight','BOTH')
DB name="SpinOffIntelligence"
DB name="SpinOffIntelligence"
Running dijkstra with other Vertices does work some time. I can't tell why.
orientdb {db=SpinOffIntelligence}> select dijkstra(#30:5,#39:5,'weight','BOTH')
+----+-------------------------+
|# |dijkstra |
+----+-------------------------+
|0 |[#30:5,#31:0,#16:6,#39:5]|
+----+-------------------------+
The text was updated successfully, but these errors were encountered: