{"action":"created","issue":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/5218","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/5218/labels{/name}","comments_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/5218/comments","events_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/5218/events","html_url":"https://github.com/orientechnologies/orientdb/issues/5218","id":113236262,"number":5218,"title":"Binary Protocol: recordPos not returned on INSERT","user":{"login":"nethertek","id":8987575,"avatar_url":"https://avatars.githubusercontent.com/u/8987575?v=3","gravatar_id":"","url":"https://api.github.com/users/nethertek","html_url":"https://github.com/nethertek","followers_url":"https://api.github.com/users/nethertek/followers","following_url":"https://api.github.com/users/nethertek/following{/other_user}","gists_url":"https://api.github.com/users/nethertek/gists{/gist_id}","starred_url":"https://api.github.com/users/nethertek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nethertek/subscriptions","organizations_url":"https://api.github.com/users/nethertek/orgs","repos_url":"https://api.github.com/users/nethertek/repos","events_url":"https://api.github.com/users/nethertek/events{/privacy}","received_events_url":"https://api.github.com/users/nethertek/received_events","type":"User","site_admin":false},"labels":[],"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":null,"comments":6,"created_at":"2015-10-25T16:51:27Z","updated_at":"2015-10-26T19:22:36Z","closed_at":null,"body":"When performing INSERT operations, the recordPos is not returned (OrientDB 2.1.4):\r\n\r\n2015-10-25 16:41:27:448 INFO  /127.0.0.1:40719 - Read 124 bytes: 1com.orientechnologies.orient.core.sql.OCommandSQL?INSERT INTO Post (content, timestamp) VALUES ('kj', 1445791287) [OChannelBinaryServer]\r\n2015-10-25 16:41:27:490 FINE  **Created record #28:7** v.1 size=25 bytes [OLocalPaginatedStorage]\r\n2015-10-25 16:41:27:491 INFO  /127.0.0.1:40719 - Writing byte (1 byte): 0 [OChannelBinaryServer]\r\n2015-10-25 16:41:27:491 INFO  /127.0.0.1:40719 - Writing int (4 bytes): 4 [OChannelBinaryServer]\r\n2015-10-25 16:41:27:491 INFO  /127.0.0.1:40719 - Writing byte (1 byte): 114 [OChannelBinaryServer]\r\n2015-10-25 16:41:27:491 INFO  /127.0.0.1:40719 - Writing short (2 bytes): 0 [OChannelBinaryServer]\r\n2015-10-25 16:41:27:491 INFO  /127.0.0.1:40719 - Writing byte (1 byte): 100 [OChannelBinaryServer]\r\n2015-10-25 16:41:27:491 INFO  /127.0.0.1:40719 - **Writing short (2 bytes): 28** [OChannelBinaryServer]\r\n2015-10-25 16:41:27:491 INFO  /127.0.0.1:40719 - **Writing long (8 bytes): -1** [OChannelBinaryServer]\r\n"},"comment":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/comments/151255874","html_url":"https://github.com/orientechnologies/orientdb/issues/5218#issuecomment-151255874","issue_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/5218","id":151255874,"user":{"login":"nethertek","id":8987575,"avatar_url":"https://avatars.githubusercontent.com/u/8987575?v=3","gravatar_id":"","url":"https://api.github.com/users/nethertek","html_url":"https://github.com/nethertek","followers_url":"https://api.github.com/users/nethertek/followers","following_url":"https://api.github.com/users/nethertek/following{/other_user}","gists_url":"https://api.github.com/users/nethertek/gists{/gist_id}","starred_url":"https://api.github.com/users/nethertek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nethertek/subscriptions","organizations_url":"https://api.github.com/users/nethertek/orgs","repos_url":"https://api.github.com/users/nethertek/repos","events_url":"https://api.github.com/users/nethertek/events{/privacy}","received_events_url":"https://api.github.com/users/nethertek/received_events","type":"User","site_admin":false},"created_at":"2015-10-26T19:22:36Z","updated_at":"2015-10-26T19:22:36Z","body":"@all \r\n\r\nThe problem appears twofold.\r\n\r\nWhen we run in **single mode**, the information is returned correctly, however orientdb seems to increment the ClusterID instead of recordPos with each insert:\r\n\r\n2015-10-26 19:09:06:273 INFO  {db=backnode} /127.0.0.1:57690 - Read 124 bytes: 1com.orientechnologies.orient.core.sql.OCommandSQL?INSERT INTO Post (content, timestamp) VALUES ('sd', 1445886546) [OChannelBinaryServer]\r\n2015-10-26 19:09:06:275 INFO  {db=backnode} /127.0.0.1:57690 - Writing byte (1 byte): 0 [OChannelBinaryServer]\r\n2015-10-26 19:09:06:275 INFO  {db=backnode} /127.0.0.1:57690 - Writing int (4 bytes): 10 [OChannelBinaryServer]\r\n2015-10-26 19:09:06:275 INFO  {db=backnode} /127.0.0.1:57690 - Writing byte (1 byte): 114 [OChannelBinaryServer]\r\n2015-10-26 19:09:06:275 INFO  {db=backnode} /127.0.0.1:57690 - Writing short (2 bytes): 0 [OChannelBinaryServer]\r\n2015-10-26 19:09:06:275 INFO  {db=backnode} /127.0.0.1:57690 - Writing byte (1 byte): 100 [OChannelBinaryServer]\r\n2015-10-26 19:09:06:275 INFO  {db=backnode} /127.0.0.1:57690 - **Writing short (2 bytes): 39** [OChannelBinaryServer]\r\n2015-10-26 19:09:06:275 INFO  {db=backnode} /127.0.0.1:57690 - **Writing long (8 bytes): 0** [OChannelBinaryServer]\r\n\r\norientdb {db=backnode}> select from Post\r\n\r\n```----+-----+------+-------+----------\r\n#   |@RID |@CLASS|content|timestamp \r\n----+-----+------+-------+----------\r\n0   |#28:0|Post  |sd     |1445886453\r\n1   |#29:0|Post  |sd     |1445886462\r\n2   |#39:0|Post  |sd     |1445886546\r\n----+-----+------+-------+----------\r\n```\r\n\r\nIn **distributed mode** , orientdb updates the recordPos, but returns -1\r\n\r\n2015-10-26 19:14:02:480 INFO  /127.0.0.1:57729 - Read 124 bytes: 1com.orientechnologies.orient.core.sql.OCommandSQL?INSERT INTO Post (content, timestamp) VALUES ('sd', 1445886842) [OChannelBinaryServer]\r\n2015-10-26 19:14:02:532 INFO  /127.0.0.1:57729 - Writing byte (1 byte): 0 [OChannelBinaryServer]\r\n2015-10-26 19:14:02:532 INFO  /127.0.0.1:57729 - Writing int (4 bytes): 2 [OChannelBinaryServer]\r\n2015-10-26 19:14:02:532 INFO  /127.0.0.1:57729 - Writing byte (1 byte): 114 [OChannelBinaryServer]\r\n2015-10-26 19:14:02:533 INFO  /127.0.0.1:57729 - Writing short (2 bytes): 0 [OChannelBinaryServer]\r\n2015-10-26 19:14:02:533 INFO  /127.0.0.1:57729 - Writing byte (1 byte): 100 [OChannelBinaryServer]\r\n2015-10-26 19:14:02:533 INFO  /127.0.0.1:57729 - **Writing short (2 bytes): 28** [OChannelBinaryServer]\r\n2015-10-26 19:14:02:533 INFO  /127.0.0.1:57729 - **Writing long (8 bytes): -1** [OChannelBinaryServer]\r\n\r\n```----+-----+------+-------+----------\r\n#   |@RID |@CLASS|content|timestamp \r\n----+-----+------+-------+----------\r\n0   |#28:0|Post  |sd     |1445886453\r\n1   |#28:1|Post  |sd     |1445886842\r\n2   |#29:0|Post  |sd     |1445886462\r\n3   |#39:0|Post  |sd     |1445886546\r\n----+-----+------+-------+----------\r\n```\r\n\r\nSo please try to reproduce the problem in **distributed mode** with **asynchronous enabled**. It is also unclear to me why the cluster id is incremented in single mode, perhaps because the database was initialized as a distributed database?\r\n\r\n"}}