{"action":"created","issue":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4644","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4644/labels{/name}","comments_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4644/comments","events_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4644/events","html_url":"https://github.com/orientechnologies/orientdb/issues/4644","id":97150256,"number":4644,"title":"ArrayIndexOutOfBound Exception when using binary protocol in Distributed mode with databases in format 1.7.x","user":{"login":"shlapkov","id":6439778,"avatar_url":"https://avatars.githubusercontent.com/u/6439778?v=3","gravatar_id":"","url":"https://api.github.com/users/shlapkov","html_url":"https://github.com/shlapkov","followers_url":"https://api.github.com/users/shlapkov/followers","following_url":"https://api.github.com/users/shlapkov/following{/other_user}","gists_url":"https://api.github.com/users/shlapkov/gists{/gist_id}","starred_url":"https://api.github.com/users/shlapkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shlapkov/subscriptions","organizations_url":"https://api.github.com/users/shlapkov/orgs","repos_url":"https://api.github.com/users/shlapkov/repos","events_url":"https://api.github.com/users/shlapkov/events{/privacy}","received_events_url":"https://api.github.com/users/shlapkov/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/orientechnologies/orientdb/labels/bug","name":"bug","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"tglman","id":424369,"avatar_url":"https://avatars.githubusercontent.com/u/424369?v=3","gravatar_id":"","url":"https://api.github.com/users/tglman","html_url":"https://github.com/tglman","followers_url":"https://api.github.com/users/tglman/followers","following_url":"https://api.github.com/users/tglman/following{/other_user}","gists_url":"https://api.github.com/users/tglman/gists{/gist_id}","starred_url":"https://api.github.com/users/tglman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tglman/subscriptions","organizations_url":"https://api.github.com/users/tglman/orgs","repos_url":"https://api.github.com/users/tglman/repos","events_url":"https://api.github.com/users/tglman/events{/privacy}","received_events_url":"https://api.github.com/users/tglman/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/orientechnologies/orientdb/milestones/58","html_url":"https://github.com/orientechnologies/orientdb/milestones/2.0.14","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/milestones/58/labels","id":1221150,"number":58,"title":"2.0.14","description":"","creator":{"login":"lvca","id":312606,"avatar_url":"https://avatars.githubusercontent.com/u/312606?v=3","gravatar_id":"","url":"https://api.github.com/users/lvca","html_url":"https://github.com/lvca","followers_url":"https://api.github.com/users/lvca/followers","following_url":"https://api.github.com/users/lvca/following{/other_user}","gists_url":"https://api.github.com/users/lvca/gists{/gist_id}","starred_url":"https://api.github.com/users/lvca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lvca/subscriptions","organizations_url":"https://api.github.com/users/lvca/orgs","repos_url":"https://api.github.com/users/lvca/repos","events_url":"https://api.github.com/users/lvca/events{/privacy}","received_events_url":"https://api.github.com/users/lvca/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":1,"state":"open","created_at":"2015-07-22T22:07:22Z","updated_at":"2015-07-31T10:29:24Z","due_on":"2015-08-04T22:00:00Z","closed_at":null},"comments":6,"created_at":"2015-07-24T21:24:36Z","updated_at":"2015-07-31T14:55:35Z","closed_at":null,"body":"Issue is exactly the same as: https://github.com/orientechnologies/orientdb/issues/2953 after starting Server in distributed mode with large production database in 1.7.x format getting the following errors when trying retrieve data via remote connections:\njvm 1    | WARN  [ORecordSerializerBinary] Error deserializing record with id #50:1850 send this dat\na for debugging: cGxhdGZvcm0tSm9iUmVwb3J0QGlkOiIyNWMwNzNmNC1lMmVjLTRmMzgtYjFmOS0yZWM5Njc4NWJjZWQiLGp\nvYklkOiIyMzUiLG5hbWU6IkNBU1MzNTUzIixvdXRwdXRGb3JtYXQ6InBkZiIsb3duZXI6InBic3Byb2MiLGNvbXBsZXRlZDoxMzM\nxNTc3Mjg3NTA3dCxyZXBvcnRDb250ZW50czojNDA6MTg1MA==\njvm 1    | ERROR [OLazyRecordIterator] Error on iterating record collection\njvm 1    | com.orientechnologies.orient.core.exception.ODatabaseException: Error on retrieving recor\nd #50:1850 (cluster: platform-jobreport)\njvm 1    |      at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.executeReadReco\nrd(ODatabaseDocumentTx.java:1640) ~[orientdb-core-2.0.12.jar:2.0.12]\njvm 1    |      at com.orientechnologies.orient.core.tx.OTransactionNoTx.loadRecord(OTransactionNoTx\n.java:88) ~[orientdb-core-2.0.12.jar:2.0.12]\njvm 1    |      at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.load(ODatabaseD\nocumentTx.java:1452) ~[orientdb-core-2.0.12.jar:2.0.12]\njvm 1    |      at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.load(ODatabaseD\nocumentTx.java:118) ~[orientdb-core-2.0.12.jar:2.0.12]\njvm 1    |      at com.orientechnologies.orient.core.id.ORecordId.getRecord(ORecordId.java:318) ~[or\nientdb-core-2.0.12.jar:2.0.12]\njvm 1    |      at com.orientechnologies.orient.core.db.record.OLazyRecordIterator.next(OLazyRecordI\nterator.java:75) [orientdb-core-2.0.12.jar:2.0.12]\njvm 1    |      at com.orientechnologies.orient.core.db.record.OLazyRecordIterator.next(OLazyRecordI\nterator.java:38) [orientdb-core-2.0.12.jar:2.0.12]\njvm 1    |      at com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordS\nerializerBinaryV0.writeLinkCollection(ORecordSerializerBinaryV0.java:698) [orientdb-core-2.0.12.jar:\n2.0.12]\njvm 1    |      at com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordS\nerializerBinaryV0.writeSingleValue(ORecordSerializerBinaryV0.java:569) [orientdb-core-2.0.12.jar:2.0\n.12]\njvm 1    |      at com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordS\nerializerBinaryV0.serialize(ORecordSerializerBinaryV0.java:261) [orientdb-core-2.0.12.jar:2.0.12]\njvm 1    |      at com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordS\nerializerBinary.toStream(ORecordSerializerBinary.java:104) [orientdb-core-2.0.12.jar:2.0.12]\njvm 1    |      at com.orientechnologies.orient.core.record.impl.ODocument.toStream(ODocument.java:2\n097) [orientdb-core-2.0.12.jar:2.0.12]\njvm 1    |      at com.orientechnologies.orient.core.record.impl.ODocument.toStream(ODocument.java:6\n95) [orientdb-core-2.0.12.jar:2.0.12]\njvm 1    |      at com.orientechnologies.orient.server.network.protocol.binary.OBinaryNetworkProtoco\nlAbstract.getRecordBytes(OBinaryNetworkProtocolAbstract.java:417) [orientdb-server-2.0.12.jar:2.0.12\n]\njvm 1    |      at com.orientechnologies.orient.server.network.protocol.binary.OBinaryNetworkProtoco\nlAbstract.writeRecord(OBinaryNetworkProtocolAbstract.java:432) [orientdb-server-2.0.12.jar:2.0.12]\njvm 1    |      at com.orientechnologies.orient.server.network.protocol.binary.OBinaryNetworkProtoco\nlAbstract.writeIdentifiable(OBinaryNetworkProtocolAbstract.java:136) [orientdb-server-2.0.12.jar:2.0\n.12]\njvm 1    |      at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinar\ny.command(ONetworkProtocolBinary.java:1230) [orientdb-server-2.0.12.jar:2.0.12]\njvm 1    |      at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinar\ny.executeRequest(ONetworkProtocolBinary.java:390) [orientdb-server-2.0.12.jar:2.0.12]\njvm 1    |      at com.orientechnologies.orient.server.network.protocol.binary.OBinaryNetworkProtoco\nlAbstract.execute(OBinaryNetworkProtocolAbstract.java:217) [orientdb-server-2.0.12.jar:2.0.12]\njvm 1    |      at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:69) [orientd\nb-core-2.0.12.jar:2.0.12]\njvm 1    | Caused by: java.lang.ArrayIndexOutOfBoundsException: 112\njvm 1    |      at com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordS\nerializerBinary.fromStream(ORecordSerializerBinary.java:74) [orientdb-core-2.0.12.jar:2.0.12]\njvm 1    |      at com.orientechnologies.orient.core.record.ORecordAbstract.fromStream(ORecordAbstra\nct.java:129) ~[orientdb-core-2.0.12.jar:2.0.12]\njvm 1    |      at com.orientechnologies.orient.core.record.impl.ODocument.fromStream(ODocument.java\n:1442) [orientdb-core-2.0.12.jar:2.0.12]\njvm 1    |      at com.orientechnologies.orient.core.record.impl.ODocument.fromStream(ODocument.java\n:76) [orientdb-core-2.0.12.jar:2.0.12]\njvm 1    |      at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.executeReadReco\nrd(ODatabaseDocumentTx.java:1625) ~[orientdb-core-2.0.12.jar:2.0.12]\njvm 1    |      ... 19 common frames omitted\n\n\nPatch for the issue was sent to @lvca few days ago.\n  \n"},"comment":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/comments/126718150","html_url":"https://github.com/orientechnologies/orientdb/issues/4644#issuecomment-126718150","issue_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4644","id":126718150,"user":{"login":"shlapkov","id":6439778,"avatar_url":"https://avatars.githubusercontent.com/u/6439778?v=3","gravatar_id":"","url":"https://api.github.com/users/shlapkov","html_url":"https://github.com/shlapkov","followers_url":"https://api.github.com/users/shlapkov/followers","following_url":"https://api.github.com/users/shlapkov/following{/other_user}","gists_url":"https://api.github.com/users/shlapkov/gists{/gist_id}","starred_url":"https://api.github.com/users/shlapkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shlapkov/subscriptions","organizations_url":"https://api.github.com/users/shlapkov/orgs","repos_url":"https://api.github.com/users/shlapkov/repos","events_url":"https://api.github.com/users/shlapkov/events{/privacy}","received_events_url":"https://api.github.com/users/shlapkov/received_events","type":"User","site_admin":false},"created_at":"2015-07-31T14:55:35Z","updated_at":"2015-07-31T14:55:35Z","body":"Commuted files in git hub: https://github.com/shlapkov/OrientIssues/blob/master/OLazyRecordIterator.java.patch\n\nhttps://github.com/shlapkov/OrientIssues/blob/master/OLazyRecordIterator.java\n\nIt is actually workaround\n\nthe root cause for the issue poor design for network protocol:\n public ORecordAbstract fromStream(final byte[] iRecordBuffer) {\n    _dirty = false;\n    _contentChanged = false;\n    if (ONetworkThreadLocalSerializer.getNetworkSerializer() != null) {\n      ONetworkThreadLocalSerializer.getNetworkSerializer().fromStream(iRecordBuffer, this, null);\n      _source = null;\n    } else\n      _source = iRecordBuffer;\n    _size = iRecordBuffer != null ? iRecordBuffer.length : 0;\n    _status = ORecordElement.STATUS.LOADED;\n\n    invokeListenerEvent(ORecordListener.EVENT.UNMARSHALL);\n\n    return this;\n  }"}}