question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Excessive number of total requests to process `graph.getVertices(key, value)`

See original GitHub issue

OrientDB Version, operating system, or hardware.

  • v2.2.7 (orientdb-graphdb Java API client and server)

Operating System

  • Linux

Expected behavior and actual behavior

Expected: binary protocol operation fulfilled in fewer than 10 requests Actual: operation fulfilled in over 380 requests

Steps to reproduce the problem

I have a database with 480 vertices stored, and I’m trying to do a look up of one of those vertices that has a unique property value. I perform this lookup like so:

OrientBaseGraph graph = factory.getTx;
Iterable<Vertex> result = graph.getVertices(key, value);

where key is an attribute of a subset of the vertices and value is a unique string of just one vertex in the database. If I execute list connections in the OrientDB console I see that this one operation made 4 requests to the database with a single connection:

orientdb {server=remote:localhost/}> list connections                    

+----+----+----------------+------+-------------------+--------+----+-----------+--------+
|#   |ID  |REMOTE_ADDRESS  |PROTOC|LAST_OPERATION_ON  |DATABASE|USER|COMMAND    |TOT_REQS|
+----+----+----------------+------+-------------------+--------+----+-----------+--------+
|0   |32  |/127.0.0.1:56834|binary|2016-08-28 15:42:10|-       |-   |Server Info|2       |
|1   |31  |/127.0.0.1:56833|binary|2016-08-28 15:42:01|-       |-   |Listening  |4       |
+----+----+----------------+------+-------------------+--------+----+-----------+--------+

Seems reasonable, though I would think this could be done in just 1 request. Also, what I get is just a collection of results, I still have to iterate over the result set to get the elements inside (there’s guaranteed to be one and only one element in this collection based on the key-value set on those vertices). So I do that with:

Vertex v = result.iterator().next();

When I check my connections again, I get taken a bit by surprise:

orientdb {server=remote:localhost/}> list connections

+----+----+----------------+------+-------------------+--------+----+-----------+--------+
|#   |ID  |REMOTE_ADDRESS  |PROTOC|LAST_OPERATION_ON  |DATABASE|USER|COMMAND    |TOT_REQS|
+----+----+----------------+------+-------------------+--------+----+-----------+--------+
|0   |32  |/127.0.0.1:56834|binary|2016-08-28 15:45:53|-       |-   |Server Info|3       |
|1   |31  |/127.0.0.1:56833|binary|2016-08-28 15:45:51|-       |-   |Listening  |383     |
+----+----+----------------+------+-------------------+--------+----+-----------+--------+

It took 383 requests to pull just one element out of an OrientGraphQueryIterable!! This seems very bizarre/inefficient. What does the orientdb-graphdb client do when it’s contacting the server? I can do a simple select * from V where key = value from the browser and get results in just one request. I would expect to be able to perform the same operation using the Graph API client in no more than 10 requests. Can someone from the OrientDB team explain what’s going on?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
tglmancommented, Sep 5, 2016

Hi All,

I fixed the issue for the case of empty transaction, so your case should not do anymore all this request.

It will be released in 2.2.9

0reactions
tglmancommented, Sep 29, 2016

No reply since a while, closing this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Get vertices by ID intensive workload on a ... - ResearchGate
Get vertices by ID intensive workload on a 500,000 vertices graph Each point represents the average time to get an answer for 200...
Read more >
GraphLoad: A Framework to Load and Update Over Ten ...
GraphLoad is a scalable graph loading framework eBay developed and deployed in production. It has been loading and updating a graph with over...
Read more >
FAQ - Nebula Graph Database Manual
The reason for this error is usually that the storaged process returns too many data back to the graphd process. Possible solutions are...
Read more >
Accelerating Graph Processing on GPUs - GraphPEG
Additional Key Words and Phrases: GPU, graph processing, load balance, ... It involves moving a large number of vertices between local vertex-lists that ......
Read more >
Using Property Graphs in an Oracle Database Environment
Property graphs allow an easy association of properties (key-value pairs) with ... you must specify the total number of logical partitions to use...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found