opencypher / cypher-for-gremlin

Cypher for Gremlin adds Cypher support to any Gremlin graph database.
Apache License 2.0
359 stars 48 forks source link

writeBufferHighWaterMark exceeded #312

Closed Jeremy-zgp closed 5 years ago

Jeremy-zgp commented 5 years ago

try to query results with using like "match (n) return n",if the size of data is pretty large,gremlin server will have a warning, Pausing response writing as writeBufferHighWaterMark exceeded on and gremlin console will not respond. But for the same data, I use "g.V()" and console can respond after a period. I guess maybe there are some issues about CypherResult, I'm not sure. I need help, thank you

dwitry commented 5 years ago

Hello @Jeremy-zgp ,

to match Cypher behavior and return data in a table format, translated query is a little different from Gremlin you directly typing in console.

match (n) return n is translated to g.V().project('n').by(valueMap().with(tokens)) which returns table with properties for each vertex.

It is different from g.V() which return Gremlin objects depending on database implementation and configuration and can return DetachedVertex (which may not contain properties at all).

As you mentioned, as the data size is large, additional steps will take additional resources, that's why you are getting a warning.

Jeremy-zgp commented 5 years ago

Hello @dwitry

thanks for your answer, but once I get the warning, I can't use the console anymore and I have to restart. I want to know if there are some ways to solve this problem.

dwitry commented 5 years ago

Hello @Jeremy-zgp,

can you clarify which Gremlin implementation (including version) are you using?

Jeremy-zgp commented 5 years ago

org.apache.tinkerpop.gremlin.driver.client.submit(final String gremlin, final Map<String, Object> parameters), the version is 3.3. As your answer mentioned, if I commit g.V().project('n').by(valueMap().with(tokens)), I can still get response, but match (n) return n can't. In fact, they are totally same , but I don't know why the results are different. So I guess if there are some problems with CypherResult in dealing with gremlin ResultSet. Thank you

dwitry commented 5 years ago

Case you are describing sounds strange. It might be related to issues with earlier versions of TinkerPop.

Can you please provide:

Is it possible for you to test this case with latest versions of both?

Jeremy-zgp commented 5 years ago

Hello @dwitry

Jeremy-zgp commented 5 years ago

Hello @dwitry After my tests, maybe it's not caused by CypherResult. I am still scouting the root of this problem. I'm sorry for bothering you, thank you.

SarthakGhosh16 commented 5 years ago

Hello @Jeremy-zgp I am facing an issue something similar to yours. https://github.com/opencypher/cypher-for-gremlin/issues/315

Did you find any answer?

dwitry commented 5 years ago

Closing issue after a week of inactivity. Don't hesitate to open a new issue if you have any more questions.