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.

infinite loop when connecting to orientdb that's running in distributed mode

See original GitHub issue

I’m using orientDB v.2.2.7 on AWS in distributed mode.

When connecting using pyorient 1.5.4, the connection freeze up. Inside the OrientSerializationCSV class, on the “_parse_collection” method, the while loop goes into an infinite loop.

It looks like “_parse_set(self, content)” can’t really handle unexpected formatting. It seems very unreliable. If “_parse_value” returns the same content as what was passed into it, as per the last “else” statement, the entire “_parse_set” method ends up in an infinite loop.

From my tests, it looks like “_parse_set” is only called when connecting to a distributed database. In my case, the code tries to parse the following string:

<"MyDatabase">,
usedMemory: 143389672l,
freeMemory: 375589912l,
maxMemory: 518979584l,
latencies: (node-0AbxA4VVo9PcEmOC: (entries: 200l,
last: 788930l,
min: 0l,
max: 788930l,
average: 788930.0f,
total: 788930l,
firstExecution: 1473174585720l,
lastExecution: 1473176590139l,
lastReset: 1473176590139l,
lastResetEntries: 1l)),
messages: (heartbeat: 199l,
deploy_db: 1l)),
(id: 0,
uuid: "6c9ab948-547d-4e91-b2a2-0e8381d91f0e",
name: "node-0AbxA4VVo9PcEmOC",
startedOn: 1473174542365t,
status: "ONLINE",
connections: 2,
listeners: [
  {
    "protocol": "ONetworkProtocolBinary",
    "listen": "127.11.11.11:2424"
  },
  {
    "protocol": "ONetworkProtocolHttpDb",
    "listen": "127.11.11.11:2480"
  }
],
user_replicator: "4047485640755908123",
databases: <"MyDatabase">,
usedMemory: 145392192l,
freeMemory: 373587392l,
maxMemory: 518979584l,
latencies: (node7096-5453: (entries: 200l,
last: 815985l,
min: 0l,
max: 1488559l,
average: 983307.0f,
total: 3933231l,
firstExecution: 1473174604530l,
lastExecution: 1473176594562l,
lastReset: 1473176564562l,
lastResetEntries: 4l)),
messages: (heartbeat: 200l))
],
database: (autoDeploy: true,
hotAlignment: false,
executionMode: "asynchronous",
readQuorum: 1,
writeQuorum: 2,
failureAvailableNodesLessQuorum: false,
readYourWrites: true,
servers: (*: "master"),
clusters: (internal: (),
index: (),
*: (servers: [
"node-0AbxA4VVo9PcEmOC",
"node7096-5453",
"<NEW_NODE>"
]),
posts_base_35: (servers: [
"node7096-5453",
"node-0AbxA4VVo9PcEmOC",
"<NEW_NODE>"
]),
posts_base_24: (servers: [
"node7096-5453",
"node-0AbxA4VVo9PcEmOC",
"<NEW_NODE>"
]),
posts_base_34: (servers: [
"node7096-5453",
"node-0AbxA4VVo9PcEmOC",
"<NEW_NODE>"
]),
posts_base_23: (servers: [
"node7096-5453",
"node-0AbxA4VVo9PcEmOC",
"<NEW_NODE>"
]),
posts_base_6: (servers: [
"node7096-5453",
"node-0AbxA4VVo9PcEmOC",
"<NEW_NODE>"
]),
posts_base_33: (servers: [
"node7096-5453",
"node-0AbxA4VVo9PcEmOC",
"<NEW_NODE>"
]),
posts_base_7: (servers: [
"node7096-5453",
"node-0AbxA4VVo9PcEmOC",
"<NEW_NODE>"
]),
posts_base_10: (servers: [
"node7096-5453",
"node-0AbxA4VVo9PcEmOC",
"<NEW_NODE>"
]),
---------------------------------
Keeps going for each cluster
---------------------------------
post_9: (servers: [
"node7096-5453",
"node-0AbxA4VVo9PcEmOC",
"<NEW_NODE>"
]),
post_26: (servers: [
"node7096-5453",
"node-0AbxA4VVo9PcEmOC",
"<NEW_NODE>"
])),
version: 410)

“_parse_set” is not able to parse that set of values and results in the connection locking up. Could we not use another deserializer instead?

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:2
  • Comments:15 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
moguicommented, Oct 5, 2016

@anber500 ok now it’s merged in the develop branch. Yes I know it’s confusing we have to clean up all the messy with forks and the likes, we are chatting with people from OrientDB too to understand how to do it It will be better I promis 😄

0reactions
nikulukanicommented, Mar 23, 2017

You can use the OGM with binary deserialization if you are using the develop branch of pyorient and have pyorient_native installed from pyorient.ogm import Graph, Config from pyorient.serializations import OrientSerialization graph = Graph(Config.from_url('my_db','root', 'root', initial_drop=False, serialization_type=OrientSerialization.Binary))

Read more comments on GitHub >

github_iconTop Results From Across the Web

Running OrientDB in distributed mode on AWS does not work
I have 3 OrientDB (2.2.7) nodes setup on AWS. They are running in distributed mode. Whenever I connect to the server on port...
Read more >
OrientDB Manual
Welcome to OrientDB - the first Multi-Model Open Source NoSQL DBMS that brings together the power of graphs and the flexibility of documents ......
Read more >
OrientDB-Manual.pdf
This tutorial assumes that you want to start a distributed database using the second method. NOTE: When you run in distributed mode, ...
Read more >
Native Parallel Graphs - TigerGraph
Operational Graph Databases include Titan, JanusGraph, OrientDB, and Neo4j. ... TigerGraph has a distributed computation mode that significantly improves ...
Read more >
gentics/mesh - Gitter
The OrientDB write quorum is set to "writeQuorum": "majority" - so two online nodes should be sufficient for a 3-node cluster setup. Unless...
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