{"action":"closed","issue":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/3808","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/3808/labels{/name}","comments_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/3808/comments","events_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/3808/events","html_url":"https://github.com/orientechnologies/orientdb/issues/3808","id":64295455,"number":3808,"title":"insert into V content { out_something: #13:5 } throws exception and continues, but should fail","user":{"login":"mrft","id":977655,"avatar_url":"https://avatars.githubusercontent.com/u/977655?v=3","gravatar_id":"","url":"https://api.github.com/users/mrft","html_url":"https://github.com/mrft","followers_url":"https://api.github.com/users/mrft/followers","following_url":"https://api.github.com/users/mrft/following{/other_user}","gists_url":"https://api.github.com/users/mrft/gists{/gist_id}","starred_url":"https://api.github.com/users/mrft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrft/subscriptions","organizations_url":"https://api.github.com/users/mrft/orgs","repos_url":"https://api.github.com/users/mrft/repos","events_url":"https://api.github.com/users/mrft/events{/privacy}","received_events_url":"https://api.github.com/users/mrft/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-25T15:13:55Z","updated_at":"2015-03-25T16:01:42Z","closed_at":"2015-03-25T16:01:42Z","body":"On OrientDB 2.0.5\r\n\r\nI was trying to get some vertices from another DB into the current one for testing (using the Rest API).\r\n\r\nI forgot that if i do a select * from V, I would also get out_ and in_ properties for edges.\r\n\r\nSo I was inserting things like\r\ninsert into V content { out_something: #13:5 } \r\n\r\nSince this #13:5 node (and the cluster also) doesn't exist, I think this should FAIL. But instead it worked, throwing an exception (that I could see in the console where the server was running).\r\n\r\nThen, when doing a simple **select * from V**, another error will be thrown, and you will only get the metadata back, and none of the fields. Which is annoying. I think the insert should have failed in the first place, so that I could have solved the problem there, instead of having to find out afterwards that I was inserting impossibe data. this allowed the database to become corrupt, which is bad (not in my simple test, but in general).\r\n\r\n<code>\r\n{db=Security} Fetching error on record #13:3500\r\ncom.orientechnologies.orient.core.exception.ODatabaseException: Error on retrieving record #24:3495 (cluster: null)\r\n\tat com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.executeReadRecord(ODatabaseDocumentTx.java:1605)\r\n\tat com.orientechnologies.orient.core.tx.OTransactionNoTx.loadRecord(OTransactionNoTx.java:80)\r\n\tat com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.load(ODatabaseDocumentTx.java:1424)\r\n\tat com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.load(ODatabaseDocumentTx.java:117)\r\n\tat com.orientechnologies.orient.core.record.impl.ODocument.field(ODocument.java:859)\r\n\tat com.orientechnologies.orient.core.fetch.OFetchHelper.processRecordRidMap(OFetchHelper.java:140)\r\n\tat com.orientechnologies.orient.core.fetch.OFetchHelper.fetch(OFetchHelper.java:70)\r\n\tat com.orientechnologies.orient.core.serialization.serializer.record.string.ORecordSerializerJSON.toString(ORecordSerializerJSON.java:337)\r\n\tat com.orientechnologies.orient.core.serialization.serializer.record.string.ORecordSerializerStringAbstract.toString(ORecordSerializerStringAbstract.java:665)\r\n\tat com.orientechnologies.orient.core.record.ORecordAbstract.toJSON(ORecordAbstract.java:192)\r\n\tat com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.formatMultiValue(OHttpResponse.java:366)\r\n\tat com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.writeRecords(OHttpResponse.java:330)\r\n\tat com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.writeResult(OHttpResponse.java:226)\r\n\tat com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostCommand.execute(OServerCommandPostCommand.java:103)\r\n\tat com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:174)\r\n\tat com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:574)\r\n\tat com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:69)\r\nCaused by: java.lang.IllegalArgumentException: Cluster segment #24 does not exist in database 'Security'\r\n\tat com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.checkClusterSegmentIndexRange(OAbstractPaginatedStorage.java:2133)\r\n\tat com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.getClusterById(OAbstractPaginatedStorage.java:1041)\r\n\tat com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.readRecord(OAbstractPaginatedStorage.java:694)\r\n\tat com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.executeReadRecord(ODatabaseDocumentTx.java:1572)\r\n\t... 16 more\r\n</code>\r\n\r\n\r\n\r\nAnother concern, while thinking of this. could one make the database corrupt by doing a update V set out_friend_of = #14:7 for example? (I think that should fail also, and that one should be forced to use the proper graph syntax to alter edges)."}}